| Author | 
		  Message
		 | 
		
		  | vasukn | 
		  
		    
			  
				 Posted: Tue Jan 22, 2002 4:49 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 20 Jan 2002 Posts: 8
  
  | 
		  
		    
			  
				Hi,
 
 
I am using MQSeries -java. I have a basic question. Is the correlation_id or message_id is being generated by the MQServer or do we have to program ? (like UIDGeneratio ?) After reading couple of messages I am getting this doubt. Please explain. Also, if we are going to generate the COrrelation_Id or Message_ID manually, how many bytes we should generate ?
 
 
Thanks.
 
 
-vasukn | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | cronydude | 
		  
		    
			  
				 Posted: Wed Jan 23, 2002 3:24 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Voyager
 
 Joined: 11 Nov 2001 Posts: 85 Location: US 
  | 
		  
		    
			  
				hi vasu,
 
    its up to u whether u supply the messageid n correlationid thro' program r not.if u don't supply, its done by the QManager.
 
 
regards,
 
crony | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | vasukn | 
		  
		    
			  
				 Posted: Wed Jan 23, 2002 8:45 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 20 Jan 2002 Posts: 8
  
  | 
		  
		    
			  
				Thanks for the reply. If it is generated by the system, how can I read the correlation_id before putting the message ?
 
 
Thanks.
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | PeterPotkay | 
		  
		    
			  
				 Posted: Wed Jan 23, 2002 9:09 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Poobah
 
 Joined: 15 May 2001 Posts: 7723
  
  | 
		  
		    
			  
				You can't. It is only available to you after the PUT.
 
 _________________ Peter Potkay
 
Keep Calm and MQ On | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | EddieA | 
		  
		    
			  
				 Posted: Wed Jan 23, 2002 1:49 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi
 
 Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles 
  | 
		  
		    
			  
				Hi,
 
 
Let me correct crony's statement.  
 
 
If you specify a MessageId, then MQ will use what you specify.  Except for JMS where the MessageID will ALWAYS be genreated by MQSeries, overwritting what you used.
 
 
If you do not specify a MessageID, then MQSeries will generate one for you.
 
 
In both the above cases, you can read the value of the MessageID back after the PUT.
 
 
MQSeries NEVER generates a CorrelationID for you.  It ALWAYS honors what you have used, even NULL.
 
 
Cheers,
 
 _________________ Eddie Atherton
 
IBM Certified Solution Developer - WebSphere Message Broker V6.1
 
IBM Certified Solution Developer - WebSphere Message Broker V7.0 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | vasukn | 
		  
		    
			  
				 Posted: Wed Jan 23, 2002 2:09 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 20 Jan 2002 Posts: 8
  
  | 
		  
		    
			  
				Thanks for the replies. 
 
If MQSeries does not create correlation id then
 
how dows the MQC.MQPMO_NEW_CORREL_ID option works with
 
putMessageOptions class ? I guess it creates the correlation_id.
 
We are using 5.2 version of MQSeries in Java.
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | StefanSievert | 
		  
		    
			  
				 Posted: Wed Jan 23, 2002 3:55 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Partisan
 
 Joined: 28 Oct 2001 Posts: 333 Location: San Francisco 
  | 
		  
		    
			  
				Eddie,
 
I'm afraid your comment on CorrelId is not quite right. All others hit the nail on the head, though!  
 
 
Form the Application Programming Reference:
 
   
	| Quote: | 
   
  
	
 
For the MQPUT and MQPUT1 calls, the application can specify any value.
 
The queue manager transmits this value with the message and delivers it
 
to the application that issues the get request for the message.
 
If the application specifies MQPMO_NEW_CORREL_ID, the queue
 
manager generates a unique correlation identifier which is sent with the
 
message, and also returned to the sending application on output from the
 
MQPUT or MQPUT1 call.
 
 | 
   
 
 
 
_________________
 
Stefan Sievert
 
IBM Certified * MQSeries
 
 
[ This Message was edited by: StefanSievert on 2002-01-23 15:56 ] | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | EddieA | 
		  
		    
			  
				 Posted: Thu Jan 24, 2002 11:17 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi
 
 Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles 
  | 
		  
		    
			  
				Hangs head in shame.  
 
 
That's an option (together with MQPMO_NEW_CORREL_ID) that I hadn't spotted before.  Looks like I'll have to change my standard answers about MesageId and CorrelID.  (Don't ever remember seeing MQPMO_NEW_MSG_ID before either.  Hmmmmm, when did they get introduced).
 
 
Thanks for pointing it out to me Stefan.
 
 
Cheers,
 
 _________________ Eddie Atherton
 
IBM Certified Solution Developer - WebSphere Message Broker V6.1
 
IBM Certified Solution Developer - WebSphere Message Broker V7.0 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |