How do You send XmlMessage or TextMessage using Dispatch Ser

Posted by memento13 on 04-Jul-2011 09:13

Hi,

I need to send message from ESB Process to SonicMQ queue and wait for response. I'm trying to use Dispatch service, but it seems that message being delivered is always MultipartMessage. Is there possibility to send message as Text- or XmlMessage?

Thanks,

Romet

All Replies

Posted by hkalluru on 04-Jul-2011 09:51

Hi Romet,

Yes, you can send Text or XmlMessage or Multipart message to the ESB Process which has Dispatch service step. Here the ESB Process will treat or change the input message as a multipart message (i.e., in this case ESB Process makes the text message or xml message as part0 into the Multipart message) even though you send a text message or xml message.

Thanks

Hari

Posted by memento13 on 04-Jul-2011 10:50

I don't want to send message to ESB Process. I want to sent message from ESB process to Sonic MQ queue, an external process will consume this message and will send response message back. The problem is that this external process should consume Text- or XmlMessage and not Sonic specific MultipartMessage.

Have read several discussions about it and it seems that when there's only one part in Multipart message, ESB should convert it to simple message, but it seems like Dispatcher Service always sends MultipartMessage.

Posted by mnair on 05-Jul-2011 08:07

Hi Romet,

If you have a message with single part and you want to prevent it from being sent out as a multipart JMS message, then set the JMS_SonicMQ_XQ.isMultipart header to false

You can use message mapping on the dispatch step to set this header.

Thanks

-Mahesh

Posted by memento13 on 05-Jul-2011 09:37

Thanks, this solution worked.

This thread is closed