多个驼峰路线和Camel AHC组件的问题

时间:2015-02-12 12:21:05

标签: apache-camel asynchttpclient

我有多次调用在同一个camel路由中配置的端点。我正在使用camel ahc组件。这在正常情况下工作正常。我们在性能测试期间遇到问题。

<camel:route>
    <camel:from id="_MessageFlow_20_1422954968407" uri="abcd:XXX/ZEMPSRV:Employees"/>
    <camel:choice id="_ExclusiveGateway_8_1422954968423">
        <camel:when>
            <camel:simple>${header.Method} == 'READ'</camel:simple>
            <camel:setHeader id="READ_Header_1" headerName="RelativeUri">
            <camel:bean id="_CallActivity_69_1422954968443" ref="odatarestprocessor" method="process"/>
            <camel:setHeader id="READ_Header_2" headerName="scriptFile">
            <camel:setHeader id="READ_Header_3" headerName="functionName">
            <camel:setHeader id="READ_Header_4" headerName="scriptFileType">
            <camel:bean id="READ_scriptprocessor_pre" ref="scriptprocessor" method="process"/>
            <camel:bean id="_ServiceTask_14_1422954968508" ref="odataDestinationProcessor" method="process"/>
            <camel:to uri="ipahc:http://dummy?synchronous=true"/>
            <camel:setHeader id="READ_Header_5" headerName="RestContentType">
            <camel:setBody id="_CallActivity_71_1422954968510">
            <camel:setHeader id="READ_Header_6" headerName="scriptFile">
            <camel:setHeader id="READ_Header_7" headerName="functionName">
            <camel:setHeader id="READ_Header_8" headerName="scriptFileType">
            <camel:bean id="READ_scriptprocessor_post" ref="scriptprocessor" method="process"/>
            <camel:bean id="_CallActivity_73_1422954968577" ref="restHashMapProcessor" method="process"/>
        </camel:when>
        <camel:when>
            <camel:simple>${header.Method} == 'FEED'</camel:simple>
            <camel:setHeader id="FEED_Header_1" headerName="RelativeUri">
            <camel:setHeader id="FEED_Header_2" headerName="scriptFile">
            <camel:setHeader id="FEED_Header_3" headerName="functionName">
            <camel:setHeader id="FEED_Header_4" headerName="scriptFileType">
            <camel:bean id="FEED_scriptprocessor_pre" ref="scriptprocessor" method="process"/>
            <camel:bean id="_ServiceTask_15_1422954968675" ref="odataDestinationProcessor" method="process"/>
            <camel:to uri="ipahc:http://dummy?synchronous=true "/>
            <camel:setHeader id="FEED_Header_5" headerName="RestContentType">
            <camel:setBody id="_CallActivity_76_1422954968677">
            <camel:setHeader id="FEED_Header_6" headerName="scriptFile">
            <camel:setHeader id="FEED_Header_7" headerName="functionName">
            <camel:setHeader id="FEED_Header_8" headerName="scriptFileType">
            <camel:bean id="FEED_scriptprocessor_post" ref="scriptprocessor" method="process"/>
            <camel:bean id="_CallActivity_78_1422954968744" ref="restHashMapProcessor" method="process"/>
        </camel:when>
        <camel:otherwise/>
    </camel:choice>
</camel:route>

问题是这两个电话混在一起。你能否建议如何避免这种情况。完成对READ的调用后,在后处理中,header方法的值为FEED。看来这两个电话混在了一起。你能否建议如何解决这个问题。

谢谢, 勒凯什

0 个答案:

没有答案