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 » MQOutput Node question

Post new topic  Reply to topic
 MQOutput Node question « View previous topic :: View next topic » 
Author Message
gecs
PostPosted: Thu May 03, 2012 10:25 am    Post subject: MQOutput Node question Reply with quote

Acolyte

Joined: 14 Nov 2007
Posts: 58

Hi everybody, I would like know if there is any form, method, etc... for get the "correlId" generated by the Queue Manager when I check the "new correlation ID" option of MQOutput Node (tag Advanced).

Thanks in advance,

Regards
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu May 03, 2012 10:33 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

You must be new here. Google is a great tool:

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac00520_.htm

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac16862_.htm

The CorrelId assigned shows up in the LocalEnvironment.

InputLocalEnvironment.WrittenDestination.MQ.DestinationData.correlId
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu May 03, 2012 10:33 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There are many many methods for getting this.

Did you want to get this value from within your flow? or did you just want to get the value?

Please look at Written Destination.
Back to top
View user's profile Send private message
gecs
PostPosted: Thu May 03, 2012 10:54 am    Post subject: Reply with quote

Acolyte

Joined: 14 Nov 2007
Posts: 58

Thanks "lancelotlinc" and "mqjeff".

Just one last question... exists any method, algorythm, etc, for generate this value (correlation Id generated by MQOutput node) by ESQL, JAVA?

I should have mentioned I use a SOAPInput node and the "replyIdentifier" property doesn't help me so much...

some information:
MQ v7.0
Message Broker v7.0
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu May 03, 2012 10:57 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You can write ESQL or Java to set a correlationID to any value you want.

You can't write ESQL or java to find out what the queue manager will set the id to BEFORE the queue manager sets it.
Back to top
View user's profile Send private message
gecs
PostPosted: Thu May 03, 2012 11:15 am    Post subject: Reply with quote

Acolyte

Joined: 14 Nov 2007
Posts: 58

mqjeff wrote:
You can write ESQL or Java to set a correlationID to any value you want.

You can't write ESQL or java to find out what the queue manager will set the id to BEFORE the queue manager sets it.


OK... thanks!!!
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu May 03, 2012 11:25 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Some fun facts about CorrelId :

1. CorrelIds, like MsgIds, are 24-byte blobs. They must be 24-bytes exactly, pad with zeros if needed.

2. You can get a human-readable version by CASTing in ESQL or a special routine in Java (Google this forum for code example).

3. Most Request/Reply scenarios where Broker is the Requestor, would not set a CorrelId, but instead would MQGet for a CorrelId that matches the Request MsgId.

4. Most Request/Reply scenarios where Broker is the Replier, would copy the incoming MsgId to the outgoing CorrelId.

5. When in doubt, use your brain before the debugger. To help your brain function, add Trace nodes before and after every major node in your flow.

6. Broker flows are simple and easy. Take my word for it.

7. QMgr-set CorrelIds are loosely a combination of timestamp and system name.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu May 03, 2012 11:27 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

lancelotlinc wrote:
7. QMgr-set CorrelIds are loosely a combination of timestamp and system name.

for extremely loose definitions of 'system name'.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu May 03, 2012 11:28 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

gecs wrote:
I use a SOAPInput node and the "replyIdentifier" property doesn't help me so much...


SOAPInput replyIdentifier would make a great CorrelId. Why do you not want to use it? It is unique.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqbrks
PostPosted: Thu May 03, 2012 11:48 am    Post subject: Reply with quote

Voyager

Joined: 17 Jan 2012
Posts: 75

lancelotlinc wrote:
gecs wrote:
I use a SOAPInput node and the "replyIdentifier" property doesn't help me so much...


SOAPInput replyIdentifier would make a great CorrelId. Why do you not want to use it? It is unique.



ReplyIdentifier is not unique.....Instead we can use UUID built in functions in ESQL / Java utils functions for unique value.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu May 03, 2012 11:55 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

mqbrks wrote:
lancelotlinc wrote:
gecs wrote:
I use a SOAPInput node and the "replyIdentifier" property doesn't help me so much...


SOAPInput replyIdentifier would make a great CorrelId. Why do you not want to use it? It is unique.



ReplyIdentifier is not unique.....Instead we can use UUID built in functions in ESQL / Java utils functions for unique value.


ReplyIdentifier is unique within the transaction set of a message flow, which satisfies most Request/Reply requirements.

If I have three transactions in-flight at the same time, the right reply will get to the right MQGet node.

Also consider that Reply-To-Qmgr field increases the uniqueness.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
lancelotlinc
PostPosted: Thu May 03, 2012 12:11 pm    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

mqbrks wrote:
ReplyIdentifier is not unique.....Instead we can use UUID built in functions in ESQL / Java utils functions for unique value.


mqbrkrs and gecs, you may be interested in seeing the samples provided in the toolkit. One such sample is Web Service Aggregation sample.

http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.samples.wsaggregation.doc%2Fdoc%2Fexploring_wsaggregation_sample.htm

Quote:
When the WSAggregationFanOut.msgflow flow is run, one or more messages can be put to each queue. The number of messages put to a queue is determined by the value of a field in the input message.

The flow stores the original SOAP reply identifier in the MQMD.CorrelId field of every output message.

Each WebSphere MQ message has a unique MQMD.MsgId field, which is a requirement for aggregation.

_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
gecs
PostPosted: Thu May 03, 2012 12:27 pm    Post subject: Reply with quote

Acolyte

Joined: 14 Nov 2007
Posts: 58

lancelotlinc wrote:
gecs wrote:
I use a SOAPInput node and the "replyIdentifier" property doesn't help me so much...


SOAPInput replyIdentifier would make a great CorrelId. Why do you not want to use it? It is unique.


Hi "lancelotic", you are right, but when I told "replyIdentifier doesn't help me..." is because of "replyIdentifier" property doesn't contains information about QMGR (the name) while in the "correlID" (generated by the QMGR) is present. (using CASTING, as you mentioned).

Regards
Back to top
View user's profile Send private message
mapa
PostPosted: Thu May 03, 2012 9:52 pm    Post subject: Reply with quote

Master

Joined: 09 Aug 2001
Posts: 257
Location: Malmö, Sweden

In scenarios SOAP to Legacy ERP, I use the SOAPInput replyIdentifier as MessageId, since the Legacy ERP will automatically put that as CorrelId in the reply.
The reply messageflow (separate, but in same EG) receives it and uses it in the SOAPReply.
Works fine under heavy load.

For one-to-one request/reply that is.
Back to top
View user's profile Send private message Visit poster's website
jacquesvdm
PostPosted: Wed May 16, 2012 11:47 pm    Post subject: Reply with quote

Apprentice

Joined: 18 Jan 2012
Posts: 29

This is how I did it
DECLARE v_corrID CHAR 'any crap I want';
SET v_corrID = v_corrID || REPLICATE('0',(24-LENGTH(v_corrID)));
SET CorrelId = CAST(v_corrID AS BLOB CCSID InputRoot.Properties.CodedCharSetId);
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 » MQOutput Node question
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.