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 » Correlation ID

Post new topic  Reply to topic
 Correlation ID « View previous topic :: View next topic » 
Author Message
vasukn
PostPosted: Tue Jan 22, 2002 4:49 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
cronydude
PostPosted: Wed Jan 23, 2002 3:24 am    Post subject: Reply with quote

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
View user's profile Send private message
vasukn
PostPosted: Wed Jan 23, 2002 8:45 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
PeterPotkay
PostPosted: Wed Jan 23, 2002 9:09 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

You can't. It is only available to you after the PUT.

_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Jan 23, 2002 1:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
vasukn
PostPosted: Wed Jan 23, 2002 2:09 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
StefanSievert
PostPosted: Wed Jan 23, 2002 3:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
EddieA
PostPosted: Thu Jan 24, 2002 11:17 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Correlation ID
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.