-
1. Re: JMS Gateway and RequestResponse
rmolin Dec 17, 2008 3:22 AM (in response to nl)Hi Niels,
This works out of the box if you configure a reply queue with same name as your inbound queue + "_reply"
See Programmers Guide pg. 26 (4.4.GA) - look for 'Default ReplyTo'
/Rune -
2. Re: JMS Gateway and RequestResponse
nl Dec 17, 2008 6:05 AM (in response to nl)Hi Rune,
thank your for this hint, but in doing so i will run into the problem, that if multiple clients calling the same service concurrently and listening on one and the same reply-queue the answer might be send to the "wrong" client. Since I'm using channels instead of topics and they are defined for peer-to-peer purposes.
Niels -
3. Re: JMS Gateway and RequestResponse
protuhj Jan 29, 2009 3:08 PM (in response to nl)I ran into this same problem of wanting to do request-response JMS, and decided to write my own Notifier target (extends org.jboss.soa.esb.notification.NotificationTarget).
If you set the reply to in your JMS client to a temporary queue (using the javax.jms standard function [setJMSReplyTo]), the class I wrote extracts that out of the message, or it will use a default queue you specify in the configuration.
Since this is a NotificationTarget, I wanted to know the success/failure of the processing pipeline, not a response from each action.
Here is a sample xml configuration to give you an idea of what I wrote:<target class="....Notifier" defaultQueue="queue/default_reply_to" notificationType="<success/error>" includeMsgBody="true/false" extraMsgProps="<client specified properties>"> </target>
Sample result of this notification:<error messageID="myMessageId"><theInputMsg>something about this message made processing fail</theInputMsg></error>
-
4. Re: JMS Gateway and RequestResponse
ryanhos Jan 30, 2009 9:16 AM (in response to nl)I believe that the ESB handles the request/response correlation on the default reply queues using jms message selectors. I wish I had more time to dig up the code or fire up an example to verify, but I have only 4 hours to move some code into peer review this morning. :)