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 » General IBM MQ Support » How to get MessageID of the message I send...

Post new topic  Reply to topic
 How to get MessageID of the message I send... « View previous topic :: View next topic » 
Author Message
bartosz
PostPosted: Thu Jun 06, 2002 4:52 am    Post subject: How to get MessageID of the message I send... Reply with quote

Newbie

Joined: 06 Jun 2002
Posts: 2

Hello!
This question may seem a little bit strange.

From an Client application (A) I want to put messages (requests) to an input queue then from an output queue I want to read the right responses.

Application (B) generates responses and to the correlationId of the response is set to the messageId of the request.

When the request is sent the messageId has value MQMI_NONE (0).
The messageId is somehow created (by the queue manager?)
and the message in the queue has an messageId different from MQMI_NONE.

My question:
If the application A does not set messageId can it somehow retrieve messageId of the message it puts into a queue?

Thank you for attention
Bartosz

P.S. Of course I can generate messageId's by myself ... but if many instances put msgs to the same queue may it would be better to rely on the generator by IMQ?
Back to top
View user's profile Send private message
kolban
PostPosted: Thu Jun 06, 2002 6:36 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

The MsgID that MQSeries generates is returned to the caller of the MQPUT operation in the MQMD structure you passed in. Assuming that you set the MQMD.MsgId field to MQMI_NONE then on return, it will contain the 24 bytes of NEW MsgId. You can then copy this to the MQMD CorrelId of the MQGET and specify a matching CortrelId. Make sure that you keep reseting MQMD.MsgId to MQMI_NONE prior to each MQPUT. A common mistake is to forget to reset this and you end up using the same MsgId over and over.
Back to top
View user's profile Send private message
bartosz
PostPosted: Fri Jun 07, 2002 1:56 am    Post subject: It is working fine :) Reply with quote

Newbie

Joined: 06 Jun 2002
Posts: 2

Thank You

It is working fine.
Greetings from Gdynia, Poland
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 » General IBM MQ Support » How to get MessageID of the message I send...
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.