Author |
Message
|
bprasana |
Posted: Fri Jun 17, 2011 4:07 pm Post subject: Message Linking |
|
|
 Disciple
Joined: 18 Apr 2005 Posts: 179
|
Hi,
I have a requirement to send different messages to different WMQ Qs but link them together so that the receiving application can identify that they are all linked.
In our case. The calling application is Datapower and receiving application is WMB.
Ideally they all need to be done parallely.
One solution is probably to make one of the messages go first and use that message id as correlation id for others. But it beats the parallel processing concept.
Is there anyway I can achieve this? |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jun 17, 2011 10:07 pm Post subject: Re: Message Linking |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
bprasana wrote: |
Hi,
I have a requirement to send different messages to different WMQ Qs but link them together so that the receiving application can identify that they are all linked.
In our case. The calling application is Datapower and receiving application is WMB.
Ideally they all need to be done parallely.
One solution is probably to make one of the messages go first and use that message id as correlation id for others. But it beats the parallel processing concept.
Is there anyway I can achieve this? |
Have you looked at the aggregation pattern ?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Jun 17, 2011 11:37 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
If you can identify something common to all the messages and the flow is one way then perhaps a collector node would do the job? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
bprasana |
Posted: Sat Jun 18, 2011 2:37 pm Post subject: |
|
|
 Disciple
Joined: 18 Apr 2005 Posts: 179
|
Interesting!! Collector node seems to solve the problem. So as long as one field Of the message payload matches, the application sending the message need not worry about it!!
I need to check if there is a transaction Id or something.
Thanks guys! |
|
Back to top |
|
 |
bprasana |
Posted: Sun Jun 19, 2011 11:07 pm Post subject: |
|
|
 Disciple
Joined: 18 Apr 2005 Posts: 179
|
Well there is one Problem though. I don't want to wait till all messages get collected. To save time I need to send them to backend ASAP. So not sure collector node can be used as it is. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Jun 19, 2011 11:48 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
bprasana wrote: |
Well there is one Problem though. I don't want to wait till all messages get collected. To save time I need to send them to backend ASAP. So not sure collector node can be used as it is. |
So the Back End will 'collect them all together' then? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jun 20, 2011 2:04 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I don't want to wait till all messages get collected. To save time I need to send them to backend ASAP |
So...just curious. If you don't need to wait for all of the messages to arrive, then why does your message flow need to know that they are part of the same 'transaction'? What is the message flow really trying to do? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Jun 20, 2011 4:26 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
What is the design goal for processing in parallel rather than loosely-coupled asynchronous?
I'm not sure what you are trying to accomplish putting ten messages in ten queues then tying them back together after they make the trip. What is the point of doing this? Surely it cannot be for performance reasons because the ten queues get serialized anyway on the ethernet network. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
bprasana |
Posted: Mon Jun 20, 2011 1:25 pm Post subject: |
|
|
 Disciple
Joined: 18 Apr 2005 Posts: 179
|
Sorry! that was little confusing and only one 1 half of the story.
Here is a scenario:
We get 4 different but related messages from datapower.All are related, but for different purpose. 3 of these are kind of reports, to get some vehicle info,credit report etc. and 1 msg is the actual business message.
In WMB, we are supposed to orchestrate this service.
Collect all 4 messages from WDP. Run all reports in parallel, send 1 main business message to backend, also send all the responses from the reports to this same back end service when asked for it.
We are trying to keep this as atomic as possible.
This is the complete picture. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jun 20, 2011 1:35 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Well, Broker is not ideally suited for process orchestration.
WPS is better at that.
But the question to examine is "what is the relationship between the order of the messages received by broker and the order of the requests that broker makes".
Is broker running the reports for the purposes of augmenting the messages before sending them to the backend? Do you need to have all of the reports completed before the main message can be sent to the backend?
Is there a clear requirement that you can't just process each message without consideration for the others?
From the answers to these questions, you will drive your design, including where you collect or aggregate. |
|
Back to top |
|
 |
bprasana |
Posted: Mon Jun 20, 2011 1:47 pm Post subject: |
|
|
 Disciple
Joined: 18 Apr 2005 Posts: 179
|
Yes, you are right WPS is known to do all this. But no WPS for this client
Answers to other questions:
No I dont have to have the reports ready before i send the main message.The main message can be sent to the back end along with the reports getting fired. The backend system after processing the main message would ask for the reports in its life cycle, by then the reports should be ready(atleast should be ordered!).
Quote: |
Is there a clear requirement that you can't just process each message without consideration for the others? |
This is a very good question. I have been thinking about it. If the datapower(originating application) is able to send a unique transaction id that is common for a set of 4 messages, we dont even have to correlate in the broker. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Jun 21, 2011 1:02 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Exactly what I was thinking. WMB doesn't need to care about correlation. If the back-end system asks for one of the reports before it has arrived, WMB should be able to send back an error code telling it to be a little more patient. |
|
Back to top |
|
 |
bprasana |
Posted: Tue Jun 21, 2011 9:38 am Post subject: |
|
|
 Disciple
Joined: 18 Apr 2005 Posts: 179
|
Just got a communication that the backend system which consumes the main xml also needs the responses of the report xmls to be part of the single message before handing it can consume it.
So somewhere in WMB i will need to correlate the responses(if not the requests).
Regards,
bprasana |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jun 21, 2011 10:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
So you might need a combination of aggregation and collector nodes...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jun 21, 2011 11:00 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I would tend to process all of the requests separately and then only collect the responses. |
|
Back to top |
|
 |
|