Apache Camel Route Multicast 不复制交换消息

Apache Camel Route Multicast does not copy the exchange message

我在我的应用程序中使用 spring dsl 创建了一个 camel route。我想在使用它时使用 multicast EIP.But 复制 exchange body,我可以从我的 endpoint 之一获取 exchange body。在第二个(多播端点)中,交换主体是 null。为什么会这样?

编辑 这是我的路线:

<route errorHandlerRef="dlc1" id="mobitRoute1">

            <from uri="cxf:bean:mobit-okuma?dataFormat=PAYLOAD" />
            <wireTap uri="activemq:queue:anaMobitQueue" />
            <to uri="velocity:response.vm" />

        </route>

        <route id="mobitRoute2" errorHandlerRef="dlc2">

            <from uri="activemq:queue:anaMobitQueue" />
            <unmarshal ref="myJaxb" />
            <to uri="bean:timeChanging" />
            <multicast>

                <to uri="activemq:queue:mobitOkumaq" />
                <to uri="activemq:queue:AysMobit" />

            </multicast>
        </route>

        <route errorHandlerRef="dlc3" id="mobitRoute3">

            <from uri="activemq:queue:AysMobit" />
            <!-- <unmarshal ref="myJaxb" /> -->
            <to uri="bean:fromPayload" />
            <to uri="cxf:bean:ays-service?dataFormat=POJO" />

        </route>

        <route errorHandlerRef="dlc4" id="mobitRoute4">

            <from uri="activemq:queue:mobitOkumaq" />
            <to uri="cxf:bean:mobit-okumaReal?dataFormat=POJO" />

        </route>

当我把交换放到 queue.This 时,我通过转换 xml 找到了解决方案,这是为什么?我不知道。

<route errorHandlerRef="dlc1" id="mobitRoute1">

            <from uri="cxf:bean:mobit-okuma?dataFormat=PAYLOAD" />

            <wireTap uri="activemq:queue:anaMobitQueue" />
            <to uri="velocity:response.vm" />

        </route>

        <route errorHandlerRef="dlc1" id="mobitRoute2">
            <from uri="activemq:queue:anaMobitQueue" />

            <camel:pipeline>
                <unmarshal ref="myJaxb" />
                <to uri="bean:timeChanging" />
                <!-- <to uri="direct:unmarshalled"/> -->
                <marshal ref="myJaxb" />
                <camel:multicast>

                    <to uri="activemq:queue:BegisMobit" />
                    <to uri="activemq:queue:AysMobit" />

                </camel:multicast>
            </camel:pipeline>

        </route>



        <route errorHandlerRef="dlc2" id="mobitRoute3">

            <from uri="activemq:queue:AysMobit" />
            <unmarshal ref="myJaxb" />
            <to uri="bean:fromPayload" />
            <to uri="cxf:bean:ays-service?dataFormat=POJO" />

        </route>

        <route errorHandlerRef="dlc3" id="mobitRoute4">

            <from uri="activemq:queue:BegisMobit" />
            <unmarshal ref="myJaxb" />
            <to uri="cxf:bean:mobit-okumaReal?dataFormat=POJO" />

        </route>