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 » How specify response queue in MQMessage ?

Post new topic  Reply to topic
 How specify response queue in MQMessage ? « View previous topic :: View next topic » 
Author Message
pgroarke
PostPosted: Tue Jun 21, 2011 11:58 am    Post subject: How specify response queue in MQMessage ? Reply with quote

Newbie

Joined: 21 Jun 2011
Posts: 2

Am using MQ 6.0 on Solaris and mqseries-6.0.2.1.jar

I have a request and matching response message protocol.

A colleague wrote an MQ connector in java which:
- reads MQM request message from configured queue / queue mgr
- does some processing logic to generate a response message
- writes response message to the write queue / queuemgr (specified in the MQM request message read earlier using MQMessage.replyToQueueManager() etc and also specifying the same correlationId)



So the existing functionality only requires configuration of 1 queue manager name and queue (as the sender specifies the queue / mgr to send the response).

I would like to write the equivalent code to send the request and receive response.
I am assuming I will be configuring 2 sets of queues / queuemanagers (1 to send to and the other to specify in my MQMessages for the other side to send to)

However I can't seem to find the method call in MQMessage that I use to write the QueueManager and QueueName in the MQMessage ?
Am I missing something basic here.
Any Help Appreciated,
Rgds
Peter
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jun 21, 2011 12:09 pm    Post subject: Re: How specify response queue in MQMessage ? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pgroarke wrote:
However I can't seem to find the method call in MQMessage that I use to write the QueueManager and QueueName in the MQMessage ?


Wouldn't that be the "set" equivalents to the MQMessage.replyToQueueManager and MQMessage.replyToQueue?

I could be wrong - Java's not my thing.

That's also an old version of WMQ. Not causing your problem I'd say but could cause future problems.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pgroarke
PostPosted: Tue Jun 21, 2011 12:20 pm    Post subject: Reply with quote

Newbie

Joined: 21 Jun 2011
Posts: 2

I couldnt find any set methods in MQMessage.
Below are the 3 calls he uses to get the information:
Come to think of it I have no idea what the below is - they look like some sort of members rather than methods

String qm = mqm.replyToQueueManagerName.trim();
String qn = mqm.replyToQueueName.trim();
byte[] cid = mqm.correlationId;
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jun 21, 2011 12:44 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pgroarke wrote:
Come to think of it I have no idea what the below is - they look like some sort of members rather than methods


If you don't know then you need to wait for advice from someone else!

I looked here and it seems to indicate that it can be used to set & get the value.

But like I said, Java is not my thing at all.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jun 21, 2011 12:59 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Vitor wrote:
pgroarke wrote:
Come to think of it I have no idea what the below is - they look like some sort of members rather than methods


If you don't know then you need to wait for advice from someone else!

I looked here and it seems to indicate that it can be used to set & get the value.

But like I said, Java is not my thing at all.


Consider that is seems to be treated as a field of the MQMessage class...
_________________
MQ & Broker admin
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 » How specify response queue in MQMessage ?
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.