2 Replies Latest reply on Aug 25, 2009 11:11 AM by domingo.gomez1

    Handling service response in a standalone JMS client

      I have a simple setup similar to the helloworld sample from the quickstarts. I am using a simple, standalone JMS client to dispatch a text message to a JMS gateway on which a ESB service is listening.

      The JMS client blocks listening for service response on a reply queue (<request queue name>_reply).

      According to the "Programmers Guide", and correct me if I am wrong, once the last action finishes processing the message, the action pipeline automatically places the message on the queue: (<request queue name>_reply), given that the actions mep attribute is set to RequestResponse in jboss-esb.xml.

      If that is true, it is not working in my case. I am trying to figure out an optimum setup for such a scenario and so far, I could only get it to work by adding a JMSRouter action at the end of the pipeline.

      Your help is appreciated. Thanks.

        • 1. Re: Handling service response in a standalone JMS client
          beve

          Hi badlan,

          According to the "Programmers Guide", and correct me if I am wrong, once the last action finishes processing the message, the action pipeline automatically places the message on the queue: (<request queue name>_reply), given that the actions mep attribute is set to RequestResponse in jboss-esb.xml.

          If the pipeline is specified with a MEP (Message Exchange Pattern) set to 'RequestResponse' then a reply will be sent to the ReplyTo EPR of the request ESB Message or, if a ReplyTo was not set set, a reply will be sent to the From EPR of the request ESB Message.
          This means that your gateway would need to set the ReplyTo on the ESB Message by specifying a 'composer-class' for you JMS Gateway listener.

          For your use case, I would use the JMSRouter like you have done. I think that is the simplest solution. If you've not seen it already there is a jms_router quickstart which also demonstrates message correlation in the ESB.

          But let me know if this does not fit your requirements and I'll see if I can come up a different approach.

          Regards,

          /Daniel

          • 2. Re: Handling service response in a standalone JMS client

            I want use the JMS approch too, but without the JMSRouter trick, because the service is used through the native ESB bus too.

            Any advice?
            BR / DGOM