Author |
Message
|
chris boehnke |
Posted: Thu May 31, 2007 6:52 pm Post subject: How to get the same MsgId in the FanOut and FanIn flows |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Hi,
I am using a request/ reply by using http nodes(web services) in two seperate FanOut(request) and FanIn(reply) message flows.
The flow lokks like this:
Source application -> FanOut flow-> JMS -> http request -> client
Source application <- FanIn flow<- JMS <- http reply <- client
If I send a message through FanOut flow(request flow), the message Id (Root.MQMD.MsgId)of the message seems to be different when the message enters into the FanIn flow(reply flow).
I want a common parameter which is same in both the FanOut and FanIn flows when a message is sent. This helps me in keep track of the messages.
Please let me know your thoughts.
Thanks. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu May 31, 2007 7:38 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Chris this is not how aggregation works.
For aggregation to work correctly each message in the fan out flow has it's own messageId. This is passed to the aggregation request node.
On the fan in flow the reply message has the request messageId in it's correlationId field and as such is matched to it's instance of the aggregation.
So no you cannot have the same messageId.... and to emphasize MQJMS does not let you set the messageId...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
chris boehnke |
Posted: Fri Jun 01, 2007 9:15 am Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
fjb_saper wrote: |
Chris this is not how aggregation works.
For aggregation to work correctly each message in the fan out flow has it's own messageId. This is passed to the aggregation request node.
On the fan in flow the reply message has the request messageId in it's correlationId field and as such is matched to it's instance of the aggregation.
So no you cannot have the same messageId.... and to emphasize MQJMS does not let you set the messageId...
Enjoy  |
I am using trace nodes at the input and output nodes of the FanOut and FanIn flows to capture the time and date when the message enters into the flow and leaves. The time difference is going to tell how much time my messageflow took to process the message.
I thought that MsgId is the key point to identify the message.
When we send some huge number of messages, it is hard to figure out which message took which time as we dont have any key value for the message to record(as the MsgId is different in both FanOut and FanIn).
Do you suggest any other field or value that can be same in both FanOut and FanIn flows for a message?.
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jun 01, 2007 9:18 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
fjb_saper wrote: |
Chris this is not how aggregation works.
For aggregation to work correctly each message in the fan out flow has it's own messageId. This is passed to the aggregation request node.
On the fan in flow the reply message has the request messageId in it's correlationId field and as such is matched to it's instance of the aggregation. |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
chris boehnke |
Posted: Sun Jun 03, 2007 3:18 pm Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
jefflowrey wrote: |
fjb_saper wrote: |
Chris this is not how aggregation works.
For aggregation to work correctly each message in the fan out flow has it's own messageId. This is passed to the aggregation request node.
On the fan in flow the reply message has the request messageId in it's correlationId field and as such is matched to it's instance of the aggregation. |
|
Is there anyway to capture the content(e.g. one particular field name) of the input message in a trace node when I implement the trace node at the input node?.
Thanks. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Jun 03, 2007 7:21 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
chris boehnke wrote: |
Is there anyway to capture the content(e.g. one particular field name) of the input message in a trace node when I implement the trace node at the input node?.
Thanks. |
You can capture whatever you want in the trace node...
However you should keep in mind that the fan in input node normally receives one (logical (think message grouping)) message per aggregation folder, so you might end up tracing more than you expected.
On the other hand you can always set your tracing node after the aggregation node...
Just as an FYI we are sending an extra message to the aggregation fan in. It contains the MQMD of the original request message and lets us send the reply using an MQReply node... And yes you might have guessed: fanout and fanin are 2 different flows for us....(V6).
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|