1 Reply Latest reply on Mar 13, 2009 7:08 AM by ubhole

    Return of an unexpected message type

    millej

      In my system I have XML messages that are passed between services as String content in JMS/ActiveMQ messages.  The problem is that the message is sent back to the ReplyTo destination (the message source) in either ActiveMQMessage or ActiveMQObjectMessage format.  The messages have a body type of string, so I was expecting to receive a TextMessage.  Why would a message with a string body be sent back as as a Message or ObjectMessage?

       

      Here is some more information on the message flow:

       

      1.  The originating service uses the springframework JmsTemplate to send a TextMessage to Camel. 

      2.  Camel routes the message to a JBI service-unit, which performs some operations based on the data.

      3.  The service-unit then uses JBI's DeliveryChannel to send the exchange back to the ReplyTo with the outMessage set with string content. 

      4.  This is where the message is received as an ActiveMQMessage or ObjectMessage, which doesn't allow me to pull the XML string from the message.

       

      Any information on why the message isn't being sent as a TextMessage or where the problem might lie would be greatly appreciated.  Thanks.

        • 1. Re: Return of an unexpected message type
          ubhole
          millej wrote:

          2.  Camel routes the message to a JBI service-unit, which performs some operations based on the data.

          3.  The service-unit then uses JBI's DeliveryChannel to send the exchange back to the ReplyTo with the outMessage set with string content. 

          Can you elaborate more on what JBI SU you are using and if possible attach the configuration to investigate further? It looks like some one in the path is either configuring wrong messge type or something of that sort but need to look more into what is being used and how.

           

          Ulhas