Author |
Message
|
Jumani |
Posted: Wed Aug 10, 2022 7:54 am Post subject: IIB MQGET node correlation ID issue |
|
|
Newbie
Joined: 25 Jul 2022 Posts: 7
|
Hi,
I have a requirement where source system passes an ID which is greater than 24 character and this needs to be passed as correlation id for MQGET node. Trying to pass through following esql expression but receive exception:
The length must be correct
Code: |
set OutputRoot.MQMD.CorrelId = CAST(ID AS BLOB CCSID 1208 ENCODING 546 );
set OutputRoot.MQMD.MsgId = CAST(ID AS BLOB CCSID 1208 ENCODING 546 );
|
Please help to resolve, thanks. |
|
Back to top |
|
 |
gbaddeley |
Posted: Wed Aug 10, 2022 2:58 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
MsgId and Correlid are exactly 24 bytes of binary data, no more, no less.
If you need to set the values, they must be padded (eg. spaces or nulls on end) or truncated to 24 bytes.
If the required ID is greater than 24 characters, you can remove redundant or constant information, or use compression techniques to reduce it to 24 binary bytes.
If the apps are not doing get by MsgId or CorrelId, consider using message properties, or include the value in the data payload of the message. _________________ Glenn |
|
Back to top |
|
 |
Jumani |
Posted: Thu Aug 11, 2022 11:54 pm Post subject: IIB MQGET node correlation ID issue |
|
|
Newbie
Joined: 25 Jul 2022 Posts: 7
|
Hi,
Thanks for the reply. Just want to know how MQGET node accepts id generated from MQOUTPUT($LocalEnvironment/WrittenDestination/MQ/DestinationData/msgId) node which is also greater than 24. Can we generate it from esql using expression as well or not. Thanks in advance |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 12, 2022 7:14 pm Post subject: Re: IIB MQGET node correlation ID issue |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Jumani wrote: |
Hi,
Thanks for the reply. Just want to know how MQGET node accepts id generated from MQOUTPUT($LocalEnvironment/WrittenDestination/MQ/DestinationData/msgId) node which is also greater than 24. Can we generate it from esql using expression as well or not. Thanks in advance |
It's not greater than 24 bytes. It's just the hex representation of the 24 bytes which gives you 48 characters...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
AH270751 |
Posted: Wed Aug 17, 2022 4:08 am Post subject: |
|
|
 Newbie
Joined: 03 Jul 2019 Posts: 3
|
MQInput --> Compute -->MQReply -->MQGet --> MQOutput
Sample CorrelId: 3030304d5700000000000000000008791659599841109023
Provide this Code in Compute Node:
SET OutputRoot.Properties.ReplyIdentifier = InputRoot.MQMD.MsgId;
SET OutputRoot.MQMD.MsgId = InputRoot.MQMD.MsgId;
SET OutputRoot.MQMD.CorrelId = InputRoot.MQMD.MsgId;
SET OutputRoot.MQMD.ReplyToQ = 'OUT';
MQGet Node : Select Get by CorrelationlId |
|
Back to top |
|
 |
gbaddeley |
Posted: Wed Aug 17, 2022 3:28 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
AH270751 wrote: |
MQInput --> Compute -->MQReply -->MQGet --> MQOutput
Sample CorrelId: 3030304d5700000000000000000008791659599841109023
Provide this Code in Compute Node:
SET OutputRoot.Properties.ReplyIdentifier = InputRoot.MQMD.MsgId;
SET OutputRoot.MQMD.MsgId = InputRoot.MQMD.MsgId;
SET OutputRoot.MQMD.CorrelId = InputRoot.MQMD.MsgId;
SET OutputRoot.MQMD.ReplyToQ = 'OUT';
MQGet Node : Select Get by CorrelationlId |
"SET OutputRoot.MQMD.MsgId = InputRoot.MQMD.MsgId;"
AFAIK, this is not necessary. MQ will generate a new unique MsgId when the output msg is Put, and MsgId is not used for selection by Get. _________________ Glenn |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Aug 26, 2022 8:42 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
gbaddeley wrote: |
... and MsgId is not used for selection by Get. |
Supported:
MQMO_MATCH_MSG_ID
MQMO_MATCH_CORREL_ID
MQMO_MATCH_GROUP_ID _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
|