6 Replies Latest reply on Aug 6, 2010 11:38 AM by Kevin Conner

    Request-response pattern using JMS?

    Mike Finn Newbie

      Maybe this has been discussed somewhere already but I can't find much on this topic.


      Looking to apply a request-response pattern over an ESB service (consumer is non-ESB), but using JMS, not HTTP/SOAP/etc. Specifically, we need to invoke an ESB service from a non-ESB-aware resource over JMS. No ESB message or ServiceInvoker available, just an inbound JMS message. The JMS provider could be WMQ, not just JBM.


      One of the ways this is typically solved (outside JBossESB, that is) is for the originator to set replyTo on the JMS request message and the provider to send response messages to that destination, setting corr id from msg id. That would seem impractical here, since it would imply there was an ESB-resolvable relationship from an arbitrary JMS destination on the incoming message to an EPR for the ESB message's replyTo by the gateway.


      The only other way we have come up with here is to use JMSRouter in the action pipeline to send responses to a fixed JMS queue. Just seems hammer and chisel, since we would probably have to manage the msgid/corrid in custom code, but maybe that's the way?


      Is there a generally accepted practice for doing this? Is it even supported without extra componentry to proxy between JMS and a ServiceInvoker call?


      Perhaps we are going about this all wrong? Any ideas or insight would be appreciated.