Author |
Message
|
granthmuk |
Posted: Mon Mar 18, 2002 8:07 am Post subject: |
|
|
 Apprentice
Joined: 16 May 2001 Posts: 38 Location: Edinburgh, Scotland
|
Has anyone on this board managed to get the above working. As far as I can tell I have implemented as detailed in the manual but I can't get it to work.
The test I am doing seems to be aggregating but once the message comes out of the AggregateReply node I don't get any of my message data, just the message properties.
I've traced the result of the following ESQL
SET OutputRoot.XML.Root = InputRoot.ComIbmAggregateReplyBody;
and I am getting
(0x1000010)XML = (
(0x1000000)Root = (
(0x1000000)MJIT = (
(0x1000000)Properties = (
(0x1000000)MessageSet = (
(0x2000000) = ''
)
(0x1000000)MessageType = (
(0x2000000) = ''
)
(0x1000000)MessageFormat = (
(0x2000000) = ''
)
(0x1000000)Encoding = (
(0x2000000) = 546
)
(0x1000000)CodedCharSetId = (
(0x2000000) = 437
)
(0x1000000)Transactional = (
(0x2000000) = UNKNOWN
)
(0x1000000)Persistence = (
(0x2000000) = UNKNOWN
)
(0x1000000)CreationTime = (
(0x2000000) = NULL
)
(0x1000000)ExpirationTime = (
(0x2000000) = NULL
)
(0x1000000)Priority = (
(0x2000000) = NULL
)
(0x1000000)ReplyIdentifier = (
(0x2000000) = NULL
)
(0x1000000)ReplyProtocol = (
(0x2000000) = 'MQ'
)
(0x1000000)Topic = (
(0x2000000) = NULL
)
)
)
(0x1000000)MJIT2 = (
(0x1000000)Properties = (
(0x1000000)MessageSet = (
(0x2000000) = ''
)
(0x1000000)MessageType = (
(0x2000000) = ''
)
(0x1000000)MessageFormat = (
(0x2000000) = ''
)
(0x1000000)Encoding = (
(0x2000000) = 546
)
(0x1000000)CodedCharSetId = (
(0x2000000) = 437
)
(0x1000000)Transactional = (
(0x2000000) = UNKNOWN
)
(0x1000000)Persistence = (
(0x2000000) = UNKNOWN
)
(0x1000000)CreationTime = (
(0x2000000) = NULL
)
(0x1000000)ExpirationTime = (
(0x2000000) = NULL
)
(0x1000000)Priority = (
(0x2000000) = NULL
)
(0x1000000)ReplyIdentifier = (
(0x2000000) = NULL
)
(0x1000000)ReplyProtocol = (
(0x2000000) = 'MQ'
)
(0x1000000)Topic = (
(0x2000000) = NULL
)
)
)
)
)
Anyone got any Ideas?
Thanks
[ This Message was edited by: granthmuk on 2002-03-19 01:41 ] |
|
Back to top |
|
 |
zpat |
Posted: Mon Mar 18, 2002 9:29 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Trace your compound message to make sure it has all the individual messages aggregated, otherwise your assignment won't work.
Here's some working ESQL:
Code: |
Set OutputRoot.MQMD.Version =2;
Set OutputRoot.MQMD.Format ='MQSTR';
Set OutputRoot.Properties.MessageDomain ='XML';
Set OutputRoot.XML."REP"."name"=
InputRoot.ComIbmAggregateReplyBody."BRAVO"."MRM"."LAST_NAME";
Set OutputRoot.XML."REP"."loc"=
InputRoot.ComIbmAggregateReplyBody."BRAVO"."MRM"."LOCATION";
Set OutputRoot.XML."REP"."emp"=
InputRoot.ComIbmAggregateReplyBody."ALPHA"."XML"."staff"."record"."EMPNO";
Set OutputRoot.XML."REP"."tel"=
InputRoot.ComIbmAggregateReplyBody."ALPHA"."XML"."staff"."record"."PHONENO"; |
When building a new message, be sure to create at least one field in each header section in the correct order (such as creating the MQMD before creating the MQRFH2 before creating the XML) - otherwise the output message may not be generated correctly or be generated at all by the parser during MQOutput.
I can probably send you some exported flows if you want them, post your Email address for this. But I think there is also a support pac out now with Aggregate examples in it.
[ This Message was edited by: zpat on 2002-03-18 09:35 ] |
|
Back to top |
|
 |
granthmuk |
Posted: Tue Mar 19, 2002 1:37 am Post subject: |
|
|
 Apprentice
Joined: 16 May 2001 Posts: 38 Location: Edinburgh, Scotland
|
Following is a trace of the aggregated message. No sign of my data, which is all XML. I can see the individual messages coming in OK.
2002-03-19 09:23:23.406000 434 UserTrace BIP4060I: Data 'Root:
(
(0x1000000)Properties = (
(0x3000000)MessageSet = NULL
(0x3000000)MessageType = NULL
(0x3000000)MessageFormat = NULL
(0x3000000)Encoding = NULL
(0x3000000)CodedCharSetId = NULL
(0x3000000)Transactional = UNKNOWN
(0x3000000)Persistence = UNKNOWN
(0x3000000)CreationTime = NULL
(0x3000000)ExpirationTime = NULL
(0x3000000)Priority = NULL
(0x3000000)ReplyIdentifier = NULL
(0x3000000)ReplyProtocol = 'MQ'
(0x3000000)Topic = NULL
)
(0x1000000)ComIbmAggregateReplyBody = (
(0x1000000)MJIT = (
(0x1000000)Properties = (
(0x3000000)MessageSet = ''
(0x3000000)MessageType = ''
(0x3000000)MessageFormat = ''
(0x3000000)Encoding = 546
(0x3000000)CodedCharSetId = 437
(0x3000000)Transactional = UNKNOWN
(0x3000000)Persistence = UNKNOWN
(0x3000000)CreationTime = NULL
(0x3000000)ExpirationTime = NULL
(0x3000000)Priority = NULL
(0x3000000)ReplyIdentifier = NULL
(0x3000000)ReplyProtocol = 'MQ'
(0x3000000)Topic = NULL
)
)
(0x1000000)MJIT2 = (
(0x1000000)Properties = (
(0x3000000)MessageSet = ''
(0x3000000)MessageType = ''
(0x3000000)MessageFormat = ''
(0x3000000)Encoding = 546
(0x3000000)CodedCharSetId = 437
(0x3000000)Transactional = UNKNOWN
(0x3000000)Persistence = UNKNOWN
(0x3000000)CreationTime = NULL
(0x3000000)ExpirationTime = NULL
(0x3000000)Priority = NULL
(0x3000000)ReplyIdentifier = NULL
(0x3000000)ReplyProtocol = 'MQ'
(0x3000000)Topic = NULL
)
)
)
)
|
|
Back to top |
|
 |
zpat |
Posted: Tue Mar 19, 2002 2:42 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
To be honest - there are so many things you need to get right for aggregation to work - although none of them are that difficult in themselves. I prefer to use separate fan out and fan out flows rather than trying to combine these functions in a single flow. That way you can check that you are getting the control message along with the 2 (or more) data messages on the queues.
I worked through the example in the manuals and I did get it to work eventually.
If you are using separate flows you must add the MQMD to the control message in the fan out flow. Remember to set the message domain of XML on the input node processing this control message in the fan in flow.
Use the WMQI debugger to trace the messages in the flow. What stage are you at? Do you have the control message and the reply messages on the appropriate queues ready for aggregation?
Test the fan out and fan in flows separately - first fan out, then fan out plus the "processing" flows or applications and then finally fan out, process and fan in.
If you PM me your Email address, I'll Email some working (simple) flows and documentation.
[ This Message was edited by: zpat on 2002-03-19 03:08 ] |
|
Back to top |
|
 |
granthmuk |
Posted: Tue Mar 19, 2002 3:09 am Post subject: |
|
|
 Apprentice
Joined: 16 May 2001 Posts: 38 Location: Edinburgh, Scotland
|
At the moment I am trying to do the aggregation in isolation. That is I am performing the fan out and fan in but with no applications in between, I want to prove that the aggregation will work. We currently do this kind of thing with an in-house written Java process which uses the MQ grouping information to coordinate the aggregation.
To get back to my current situation I have two separate flows running in two separate execution groups. As far as I can tell the Fan-out is working as designed and is creating the required control and request messages.
The one thing I had to do in my aggregate flow to get me as far as I am now was to copy the messageid to the correlid thus behaving as if the message had been processed by another application. I could do this in another flow to separate this out but I doubt this would change anything, I may try this just in case. |
|
Back to top |
|
 |
zpat |
Posted: Tue Mar 19, 2002 3:31 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Just write another short flow to act as the application.
It can use the MQREPLY node to reply.
All the flows can run in a single execution group if you want. The fan out and fan in must run on the same broker though.
[ This Message was edited by: zpat on 2002-03-19 03:33 ] |
|
Back to top |
|
 |
Miriam Kaestner |
Posted: Wed Mar 20, 2002 12:38 am Post subject: |
|
|
Centurion
Joined: 26 Jun 2001 Posts: 103 Location: IBM IT Education Services, Germany
|
Do you connect the REPLY_IN MQINput node directly to the AggregateReply node? Then it should work.
But, if you do anything to the incoming reply BEFORE the AggregateReply node, the result will be an empty aggregation body like you experienced.
This is a known problem which will be fixed with CSD02. |
|
Back to top |
|
 |
granthmuk |
Posted: Wed Mar 20, 2002 1:04 am Post subject: |
|
|
 Apprentice
Joined: 16 May 2001 Posts: 38 Location: Edinburgh, Scotland
|
My flow has two nodes between the MQInput and the AggregateReply, one compute and one trace. I'll give it a go without either.
Thanks. |
|
Back to top |
|
 |
granthmuk |
Posted: Wed Mar 20, 2002 1:17 am Post subject: |
|
|
 Apprentice
Joined: 16 May 2001 Posts: 38 Location: Edinburgh, Scotland
|
It now works.
Thanks Miriam. |
|
Back to top |
|
 |
|