0

我有多个调用在同一骆驼路线内配置的端点。我正在使用骆驼 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 的调用之后,在后处理中,标头 Method 的值是 FEED。这两个电话似乎混在一起了。您能否建议如何解决此问题。

谢谢,拉克什

4

0 回答 0