Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 19th, 2010, 07:44 AM
Registered User
Join Date: Nov 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Jms Request/Reply question

Hi All,

I am doing a JMS request/reply pattern as specified in Professional JMS.

I get the whole thing of setting up temporary queues for the initial requestor to read a response from the responder.

What I want to know, is whether it is possible to use a single queue for the request and response without the 2 subscribers on the queue hijacking each other's messages.

For example:
- client A sends message to Q.requestReply queue with text ("the request")
- B reads message off Q.requestReply queue
- B captures MessageId
- B sets the replyMessage CorrelationId = MessageId
- B sends replyMessage to Q.requestReply queue with text ("the response")
- A reads the reply message and prints "the response"

Is this possible without B picking up the message that it replied to A?
I am trying this through java, and if A is down, B keep on reading the message that it posted to the Q as a response to A.

Hope this makes sense
Reply With Quote
  #2 (permalink)  
Old November 19th, 2010, 11:40 AM
Registered User
Join Date: Nov 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Got it working

I used a message selector in combination with the correaltion id to filter out messages on the producer and the consumer if anyone is interested.
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about Request.InputStream chobo2 C# 2008 aka C# 3.0 0 January 15th, 2009 11:00 PM
reply to a question:datatype of unbound object q2q2 BOOK: Access 2003 VBA Programmer's Reference 0 November 8th, 2006 04:58 PM
Request question thunder Classic ASP Basics 1 February 26th, 2006 10:29 AM
Please Help Me IN JMS shailsneh J2EE 0 March 23rd, 2005 09:40 AM
Request.ServerVariables HTTP_REFERRER question savoym Classic ASP Basics 6 May 25th, 2004 02:05 PM

All times are GMT -4. The time now is 04:28 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.