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 » WebSphere Message Broker (ACE) Support » Generate a new MsgId in a compute

Post new topic  Reply to topic
 Generate a new MsgId in a compute « View previous topic :: View next topic » 
Author Message
lillo
PostPosted: Wed Jul 16, 2003 2:10 am    Post subject: Generate a new MsgId in a compute Reply with quote

Master

Joined: 11 Sep 2001
Posts: 224

Hi,

Is it possible to generate a new MsgId inside a compute node?

I know it is possible to do this putting a message in a queue and selecting the appropiate option, but this is not want I want to do.

TIA,
_________________
Lillo
IBM Certified Specialist - WebSphere MQ
Back to top
View user's profile Send private message
Craig B
PostPosted: Wed Jul 16, 2003 3:27 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

New Message Ids are generated by the queue manager at MQPUT time as instructed by the put message options or through the use of MQMI_NONE. I do not believe that WMQI offers any function that can generate a message id in a similar fashion that the queue manager does. The user can construct their own OutputRoot.MQMD.MsgId field value and have this populated in the output message, but there is no guarantee that this MsgId will be unique to the queue manager. If you did want to generate your own unique ids then the closest you can get to this in ESQL is to use the UUIDASBLOB function to generate a unique BLOB UUID which would then need to be manipulated to fit into the MsgId field. The only danger is that the manipulation to shorten it may take away the uniqueness.
_________________
Regards
Craig
Back to top
View user's profile Send private message
jfluitsm
PostPosted: Wed Jul 16, 2003 9:53 am    Post subject: Reply with quote

Disciple

Joined: 24 Feb 2002
Posts: 160
Location: The Netherlands

UUIDASBLOB will fit into MsgId as it is 16 bytes long.
Be careful what to do with the other 8 bytes (binary zero? before or after the UUID?).
_________________
Jan Fluitsma

IBM Certified Solution Designer WebSphere MQ V6
IBM Certified Solution Developer WebSphere Message Broker V6
Back to top
View user's profile Send private message Send e-mail
rwa
PostPosted: Wed Jul 16, 2003 11:19 pm    Post subject: Reply with quote

Voyager

Joined: 22 Jan 2002
Posts: 76
Location: Duesseldorf/Germany

What is the reason to compute a MsgId without an MQPUT?

Do you need the MsgId befor an MQPUT or an MQCMIT?

If it is MQCMIT you can do the MQPUT in an transaction read the MsdId, compute whatever you want and the do the MQCMIT controlled by the result of the computation (if needed).
Back to top
View user's profile Send private message Send e-mail Visit poster's website
EgilsJ.Rubenis
PostPosted: Thu Jul 17, 2003 12:15 am    Post subject: Reply with quote

Acolyte

Joined: 18 Nov 2002
Posts: 63
Location: Germany, Alfeld

Hi,

the follwoing statement works in ESQL for the CorrelID.

SET "OutputRoot"."MQMD"."CorrelId" = MQCI_NEW_SESSION;

I haven't cheked if it also works for the MsgID. I would guess so.

Egils
Back to top
View user's profile Send private message Send e-mail
Craig B
PostPosted: Thu Jul 17, 2003 6:56 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

MQCI_NEW_SESSION is a Websphere MQ constant that instructs the Websphere MQ queue manager that a new CICS bridge session is to be started and hence new sequence numbers should be used. These constants are similar to MQMI_NONE and MQCI_NONE etc, that are only actioned by the queue manager at MQPUT time. Using such constants will not give you the value in the message tree before the MQPUT from an MQOutput node. And in this case, the user wants to avoid the use of the MQOutput node.
_________________
Regards
Craig
Back to top
View user's profile Send private message
vmcgloin
PostPosted: Thu Jul 17, 2003 7:23 am    Post subject: Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

Lillo,

Why do you want to do this? Presumably you will be using the Output node at some point, so could you arrange the logic so that the Compute node is after the output node? I might be wrong (I often am) but I recall connecting up the out terminal of an MQOutput node to retrieve the MsgId of a message, in a message flow once.

Let us know what you end up doing...

Cheers,
Vicky
Back to top
View user's profile Send private message
lillo
PostPosted: Fri Jul 18, 2003 1:41 am    Post subject: Reply with quote

Master

Joined: 11 Sep 2001
Posts: 224

rwa wrote:
What is the reason to compute a MsgId without an MQPUT?


I am using two aggregate in a row. In my second aggregate I need to pass some information directly to the Fan-in message flow. Actually I´m doing this generating a new MsgId in the MQOutput node and having an extra dummy message flow (MQInput and MQReply).

Because the message is in the second aggregate flow, I got an error indicating the MessageId is not unique.

TIA
_________________
Lillo
IBM Certified Specialist - WebSphere MQ
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 » WebSphere Message Broker (ACE) Support » Generate a new MsgId in a compute
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.