ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Retrieving a reply message using JMS

Post new topic  Reply to topic
 Retrieving a reply message using JMS « View previous topic :: View next topic » 
Author Message
cambers
PostPosted: Wed Jun 19, 2002 1:08 pm    Post subject: Retrieving a reply message using JMS Reply with quote

Newbie

Joined: 19 Jun 2002
Posts: 2

Hi,

i am fresh to JMS and MQ and have maybe a simple question on request/reply PTP messaging.

i have a client app that fires off requests to a server which in turn sends back a reply (populating the correlation Id based on the request's message Id).

back on client, i now want to obtain the reply message from the queue by testing the correlation Id. what would be the best way to obtain a specific message off the reply queue using JMS (basically, i'm hoping to get to grips with best design/code practice for message polling or use of QueueRequestor or a MessageListener; not considering message-driven beans).

Any advice or pointer to sample code much appreciated.
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Jun 20, 2002 5:59 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

The mqjmsreq.java and mqjmssrv.java samples in the Software Repository act as a requestor/server. However, they don't do anything with the message id/correlation id. You might be able to start with them.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
granthmuk
PostPosted: Mon Jun 24, 2002 12:45 am    Post subject: Reply with quote

Apprentice

Joined: 16 May 2001
Posts: 38
Location: Edinburgh, Scotland

From our experience using the CorrelId as a JMS selector did not scale at all well. We are using the underlying MQ Classes to get messages with Correlid and this is performing OK.
Back to top
View user's profile Send private message
cambers
PostPosted: Mon Jun 24, 2002 8:11 am    Post subject: Reply with quote

Newbie

Joined: 19 Jun 2002
Posts: 2

Thanks for your advice - this was one of my concerns. I'd be interested in others experience of using JMS message selectors in enterprise applications. Did you feel this justified ditching JMS altogether in favour of MQ base classes?
Back to top
View user's profile Send private message
Naftalanja
PostPosted: Fri Jun 28, 2002 4:22 pm    Post subject: Reply with quote

Acolyte

Joined: 30 Jan 2002
Posts: 63
Location: Los Angeles

May be using the QueueBrowser from com.ibm.mq.jms.* package would be nice. I was able to browse 5000 messages and checking for the message which has matching corr id (i was typically looking for corr id of 5000th message) in aroun 20 sec. Which is not very bad though, but safe i guess. hope this helps thanks
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Retrieving a reply message using JMS
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.