Author |
Message
|
OfficeWorker |
Posted: Mon Mar 18, 2013 10:46 pm Post subject: Send aggregate request without MQReply |
|
|
Novice
Joined: 05 Aug 2012 Posts: 11
|
I have a flow that takes a file in roughly this structure
Code: |
<file>
<headerData></headerData>
<request1></request1>
<request2></request2>
<request3></request3>
</file> |
I'm using the aggregate control to send the requests to a separate flow for processing, which then replies back using the MQReply node.
This is then collected fine by another flow by the aggregate responses node.
The problem occurs with the header data. I don't want to send this data through the processing flow, I want it to appear directly at the other end where it can be reassembled along with the rest of the file.
I am trying to do this by directly routing the output of the aggregate request flow to the aggregate response flow via an MQ output. However, the Aggregate responses node rejects it saying "invalid replyId on reply message"
The obvious solution would be to create a separate flow to simply reply back to this. However, this seems a bit wasteful (creating an extra queue, and extra flow) seeing as no reply is actually required, just for the message to be passed directly on.
Is there a way to send this through direct without the MQReply node? |
|
Back to top |
|
 |
adubya |
Posted: Tue Mar 19, 2013 2:00 am Post subject: |
|
|
Partisan
Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK
|
We use a "loopback" flow which is part of the aggregation and just returns the input contents to the aggregation reply using MQReply. So basically your "obvious" solution. There may be better solutions obviously but it works for us. |
|
Back to top |
|
 |
McueMart |
Posted: Tue Mar 19, 2013 2:13 am Post subject: |
|
|
 Chevalier
Joined: 29 Nov 2011 Posts: 490 Location: UK...somewhere
|
Before you send the "echo" / "loopback" message (or whatever you want to call it!), you just need to set the CorrelId to the MsgId.
Code: |
SET OutputRoot.MQMD.CorrelId = InputRoot.MQMD.MsgId;
|
This should do what you need without the need to send it to an intermediate 'MQ Reply' flow. |
|
Back to top |
|
 |
adubya |
Posted: Tue Mar 19, 2013 7:15 am Post subject: |
|
|
Partisan
Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK
|
Cheers McueMart, just verified that in our test environment. So that's one flow (loopback) we could do without  |
|
Back to top |
|
 |
OfficeWorker |
Posted: Tue Mar 19, 2013 7:28 pm Post subject: |
|
|
Novice
Joined: 05 Aug 2012 Posts: 11
|
Thanks McueMart, nice and simple. It worked!  |
|
Back to top |
|
 |
OfficeWorker |
Posted: Tue Mar 19, 2013 10:07 pm Post subject: |
|
|
Novice
Joined: 05 Aug 2012 Posts: 11
|
Hrmm.. Ok I spoke too soon.
I was testing with an MQinput but when I reconnected my FileInput node it doesn't work because there is no MQMD, and hence no MsgId.
Trying to generate the MsgId it manually but haven't had much success so far. |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Tue Mar 19, 2013 10:36 pm Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
Read more about UUIDAS... functions broker provides for you.
--
Marko |
|
Back to top |
|
 |
OfficeWorker |
Posted: Tue Mar 19, 2013 11:00 pm Post subject: |
|
|
Novice
Joined: 05 Aug 2012 Posts: 11
|
I was playing with this, but it seems to keep complaining that the "length must be correct".
I know it must be 24 bytes, but I'm having trouble getting setting it to be exactly that.
Most of what I've read unfortunately, has said that manually setting the MsgId is a bad idea, so I'm now thinking I may as well just stick with the loopback flow, which already works |
|
Back to top |
|
 |
|