1 Reply Latest reply on May 13, 2008 5:10 AM by kconner

    Async example

    andybarker

      Hi, I've been looking at the example from

      http://wiki.jboss.org/wiki/AsyncContinuation

      in order to implement the JMS request reply pattern using correlation ID.

      Right now the solution I have implemented is to put the JMS correlationId as an attachment on the message as part of the InitContinuationAction, but I think I should be able to set this in the header of the message in a similar way to the following code

      continuationReplyTo.getAddr().addExtension("replyTo", replyToEPRValue) ;

      If anyone knows of a better strategy than mine (or any draw backs with passing the correlationId in this way) please let me know.

        • 1. Re: Async example
          kconner

          Adding this into the EPR is the correct way of handling this, it is the only guaranteed way of having the information available to process your reply.

          "andybarker" wrote:
          continuationReplyTo.getAddr().addExtension("replyTo", replyToEPRValue) ;


          This is the correct way to add it into the EPR, as an extension.

          continuationReplyTo.getAddr().addExtension("correlationId", correlationId) ;


          You can then pull out the correlation id from the incoming EPR.