JMSReplyTo

Posted by chriselst on 27-Feb-2012 04:29

Is it possible to set the JMSReplyTo from within an ESB process?

I have tried a number of methods in both xslt and js files but with no success so far.

The reason why I want to do this is;

I receive messages from various sources over which I have no control, they do not set the JMSReplyTo, they do not want a reply.

I deliver these messages to another system that I have no control over, this may or may not give me a reply if JMSReplyTo is set.

I may or may not need to do something with those replies at a later point.

So, if I can set the JMSReplyTo when I receive the message into my ESB process to a queue for example, any replies will be delivered to it and I can deal with them at my leisure.

Any help or advice gratefully received.

Chris

All Replies

Posted by pmeadows on 27-Feb-2012 04:45

You can set a message header named "{http://www.sonicsw.com/esb}ReplyTo".  This takes the name of an ESB Endpoint so to use this you'd need to create an ESB Endpoint that references the queue you want the replies to go to.  There are at least a couple of Knowledge Base articles related to this which you may want to check out, e.g.:

  P179097 - How to set ReplyTo property on an XQMessage?

  S2238 - How to set JMSReplyTo using the Sonic ESB XSL Message/Header Extensions

Posted by chriselst on 27-Feb-2012 04:54

Thanks,


I had found the first KB article, but was struggling to get it to work.


Whereabouts can I find the second, as I cannot find it on the Progress SupportLink KB anywhere.

Ignore that, got it working now.

Thanks for the pointers.

Simply added in a line to a js rules file like this;

XQMessage.setReplyTo(XQServiceContext.getAddressFactory().createEndpointAddress("dsmError"));

where dsmError is the name of my MQ Endpoint and all was well.

This thread is closed