Author |
Message
|
Esa |
Posted: Tue Jun 18, 2013 12:44 am Post subject: [solved] set correlid revisited |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
With earlier MB versions it was sometimes challenging to programmatically set the correlation id of a message. MQ cleared the value to zeros unless you set the value via Properties.replyIdentifier.
In V 8 setting correlationId directly seems to work.
I have two flows that use the same ESQL code for copying msgId to correlId for the output message.
After Flow 1 the correlation id of the output message is correctly se to the msgId of the input message.
After Flow 2 the correlation id is reset to zeros.
The only difference is that the compute module of Flow 1 calls an external ESQL procedure to copy the id's but Flow 2 uses a subflow that calls the same external ESQL.
Message Broker 8.0.0.2.
Subflows and ESQL are compiled inline in the bar file.
The interesting thing is that in the debugger LocalEnvironment.WrittenDestination shows the changed correlid, but the actual output message has it reset. If I make event monitoring emit WrittenDestination (transactionally), the event will have the reset correlationId, too.
Edit: set title to [solved]
Last edited by Esa on Tue Jun 18, 2013 5:08 am; edited 1 time in total |
|
Back to top |
|
 |
Tibor |
Posted: Tue Jun 18, 2013 3:00 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
Hi Esa, just a notice. I have no experience with WMB v8, but it was not observed a similar behavior: a lot of message flows contain ESQL module for setting directly the MQMD.CorrelId property and it works without any problem. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jun 18, 2013 3:27 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
V8.0.0.2 - I have several subflows which set MQMD.CorrelId with no issues. You might like to review your parameters. It seems the problem you have identified is not universal among V8 users. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
Esa |
Posted: Tue Jun 18, 2013 3:38 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
lancelotlinc wrote: |
V8.0.0.2 - I have several subflows which set MQMD.CorrelId with no issues. You might like to review your parameters. It seems the problem you have identified is not universal among V8 users. |
Separately deployed or inlined subflows?
Which parameters do you mean? MQ Output parameters are the same for both flows.
If I change Flow 2 to call the ESQL procedure directly, correlId is not reset. Which means that the problem is not with MQ Output parameters.
Tibor wrote: |
Hi Esa, just a notice. I have no experience with WMB v8, but it was not observed a similar behavior: a lot of message flows contain ESQL module for setting directly the MQMD.CorrelId property and it works without any problem. |
I think I had the problem with V 6.1. I searched the forum and found out that others have had that too. I guess it was fixed/changed in V 7. |
|
Back to top |
|
 |
Tibor |
Posted: Tue Jun 18, 2013 3:40 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
Esa wrote: |
I think I had the problem with V 6.1. I searched the forum and found out that others have had that too. I guess it was fixed/changed in V 7. |
Some of message flows here works for years, since v5 or v6. So I dunno... |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jun 18, 2013 3:47 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
Esa |
Posted: Tue Jun 18, 2013 3:50 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
Tibor wrote: |
Esa wrote: |
I think I had the problem with V 6.1. I searched the forum and found out that others have had that too. I guess it was fixed/changed in V 7. |
Some of message flows here works for years, since v5 or v6. So I dunno... |
I had the problem myself just a year ago with 6.1. I guess the behavior may depend on MQMD.msgType.
Anyhow, this is not the issue. The current problem is that correlation id's set by a(n inlined) sublow in V 8.0.0.2 seem to be "transient". |
|
Back to top |
|
 |
Esa |
Posted: Tue Jun 18, 2013 3:55 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
Yes. So you are using inlined sublflows, too. And for the same reasons, except perhaps lazyness excluded
I will try to reproduce the problem on my own laptop and run some traces when I have better time. |
|
Back to top |
|
 |
Tibor |
Posted: Tue Jun 18, 2013 3:57 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
OK.
Do you use MQOutput or MQReply node for putting the message into the queue? And what is the Context setting? |
|
Back to top |
|
 |
Esa |
Posted: Tue Jun 18, 2013 4:13 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
Tibor wrote: |
OK.
Do you use MQOutput or MQReply node for putting the message into the queue? And what is the Context setting? |
MQOutput with "Pass All".
AFAIK Message Context setting should not have any effect on correlId. |
|
Back to top |
|
 |
mb01mqbrkrs |
Posted: Tue Jun 18, 2013 4:49 am Post subject: |
|
|
Apprentice
Joined: 18 Nov 2011 Posts: 48
|
|
Back to top |
|
 |
Esa |
Posted: Tue Jun 18, 2013 5:06 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
Right, now I remember too. My flow had SOAPInput nodes.
The problem is solved now. It wasn't the subflow. After that I had a little compute node that modified only Environment and thus didn't bother to copy the message even if the nodes compute mode was 'Message'.
The strange thing is that the output messages were not empty. But that's another story. |
|
Back to top |
|
 |
Esa |
Posted: Tue Jun 18, 2013 5:20 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
Forgot this:  |
|
Back to top |
|
 |
|