2015-01-27 1 views
0

я сделал camel route в моем приложении с spring dsl .I хочет скопировать exchange body с помощью multicast EIP.But, когда я использую это, я могу взять exchange body от одного из моих endpoint . Во втором (который является конечной точкой в ​​многоадресной рассылке) обменным телом является null. Почему это происходит так?Apache Camel Route Multicast не копирует обмен сообщений

EDIT Это мой маршрут:

<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> 
+0

Не могли бы вы рассказать о настроенном вами маршруте? – Ralf

+0

Я добавил маршрут, отредактировав вопрос @ Ralf – AknKplnoglu

ответ

0

Я нашел решение с помощью преобразования XML, когда я положил обмен на queue.This почему? Я не знаю.

<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>