Is there a way to generate a unique MQMD.MsgId in esql code WITHOUT putting the message to a queue eventually?
I use to develop flows which gets its original (incoming) message from an Input Queue and hence always had a message ID to work with. In the new requirement my messages will come in via a SOAPInput node.
I have a flow: SOAPInput -> AddMQMD_ComputeNode -> Subflow(Log To DB) -> Transform_ComputeNode -> SendToExternalSystem -> Subflow(Log To DB)
[Also a SOAPReply within the flow but node important for this issue]
I have a Subflow(Log To DB) used throughout our flows / environment which logs messages to our database. One of the fields logged is the MQMD.MsgId of messages as is pass through the flows and the system in general.
I need to generate a unique MsgId at the point where I get the SOAP Message as I need to log the incoming message to the database before we do transformation etc on it and later within the flow the same MsgId would also be used to logged subsequent transformed messages.
I'll always get a X'000000....' MsgId if I do the following:
Set OutputRoot.MQMD.MsgId = MQMI_NONE;
within the AddMQMD Compute node which is not the desired result.
Is there any way / function to generate a proper MsgId WITHOUT me having to write the message to an output queue?
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
Not a msgId (or a default msgId) but you could use the UUID functions to generate an id. _________________ Honesty is the best policy.
Insanity is the best defence.
You could also write a dummy message to a queue with a very short expiry, so the queue would never fill up. With a create new msgid on the output node you could then retrieve the msgid from the local environment and have your ID at the right format...
Not a msgId (or a default msgId) but you could use the UUID functions to generate an id.
The problems you are facing are caused because of your reliance on the behaviour of a particular technology (in this case MQ). If you can resize the DB field it should be possible to use something like uuidaschar or even get the underlying DBMS to generate values for you.
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