| Author | 
		  Message
		 | 
		
		  | pgroarke | 
		  
		    
			  
				 Posted: Tue Jun 21, 2011 11:58 am    Post subject: How specify response queue in MQMessage ? | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue Jun 21, 2011 12:09 pm    Post subject: Re: How specify response queue in MQMessage ? | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | pgroarke | 
		  
		    
			  
				 Posted: Tue Jun 21, 2011 12:20 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue Jun 21, 2011 12:44 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Tue Jun 21, 2011 12:59 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |