ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Handle Single Request - Multiple responses in Message Broker

Post new topic  Reply to topic
 Handle Single Request - Multiple responses in Message Broker « View previous topic :: View next topic » 
Author Message
Sriharsha
PostPosted: Mon Oct 08, 2007 10:06 am    Post subject: Handle Single Request - Multiple responses in Message Broker Reply with quote

Novice

Joined: 20 Feb 2006
Posts: 13

Hi,

We have a situation in which for each single request sent to the backend from a message flow we might get 1 or 2 reply messages from the backend depending on the request message but we have to send only one reply message to the frontend application.

I read about aggregation nodes and looks like they can be used only if single request is fanned out into multiple requests in the request message flow and then responses for each of the fanned out request are aggregated in the reply flow. Can they be used even if a single request goes out in the request message flow but yields multiple responses in the reply ?

If not aggregation nodes i am thinking of using DB to cache and aggregate the multiple replies in the reply flow. Please let me know if you know any better solution than using DB
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Oct 08, 2007 10:36 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Use an MQGet node to fetch the reply or replies.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
TonyD
PostPosted: Mon Oct 08, 2007 11:32 am    Post subject: Reply with quote

Knight

Joined: 15 May 2001
Posts: 540
Location: New Zealand

Quote:

If not aggregation nodes i am thinking of using DB to cache and aggregate the multiple replies in the reply flow. Please let me know if you know any better solution than using DB


As Jeff said, MQGet will handle the multiple replies; you will need to have a way of knowing when you have received the last response, so that you can then go ahead and prepare the single response to the original requester. DB is unnecessary ... you should be able to accumulate the responses in the 'Environment' or in a ROW variable.
Back to top
View user's profile Send private message Send e-mail
Sriharsha
PostPosted: Mon Oct 08, 2007 12:43 pm    Post subject: Reply with quote

Novice

Joined: 20 Feb 2006
Posts: 13

Yes we have a tag in the reply message by which we can decide if it's the last response in the series of replies.

I will try using MQGet node and join both the replies together.

Thanks for your help..
Back to top
View user's profile Send private message
TonyD
PostPosted: Mon Oct 08, 2007 12:59 pm    Post subject: Reply with quote

Knight

Joined: 15 May 2001
Posts: 540
Location: New Zealand

You will need to use a PROPAGATE loop to drive the MQGet node multiple times. Following a successful GET you can store the resulting message conyent in an array before control is passed back to the next MQGet.
Back to top
View user's profile Send private message Send e-mail
Sriharsha
PostPosted: Mon Oct 08, 2007 1:07 pm    Post subject: Reply with quote

Novice

Joined: 20 Feb 2006
Posts: 13

We get only 2 replies at the maximum. Then i guess i just have to store the first reply in the queue. When the last or 2nd reply comes pass it onto the MQGet node which takes the first reply from the queue and joins both of them right?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Oct 08, 2007 1:25 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

No.

You can just run the MQGet twice, once for the original reply and once for the second one.

If you configure it correctly, the node will store the data of both responses in different places (for example, by using Environment or a ROW variable as mentioned by TonyD). Then you can write ESQL to read from those two places, and build your response.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
EddieA
PostPosted: Tue Oct 09, 2007 7:52 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Just remember that the MQGet node cannot read the same Queue as the MQInput.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 09, 2007 8:03 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

EddieA wrote:
Just remember that the MQGet node cannot read the same Queue as the MQInput.


http://www.mqseries.net/phpBB2/viewtopic.php?t=33511
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Bill.Matthews
PostPosted: Tue Oct 09, 2007 9:36 am    Post subject: Reply with quote

Master

Joined: 23 Sep 2003
Posts: 232
Location: IBM (Retired)

In the referenced post, EddieA also said that the restriction may be lifted in a future release...

Well, that future release is WebSphere Message Broker V6.1 (ega Nov 22, 2007) and the restriction will be removed (I asked the specific question).

Cheers
_________________
Bill Matthews
Back to top
View user's profile Send private message
Swathi3
PostPosted: Mon Jun 10, 2013 11:50 pm    Post subject: Handle Single Request - Multiple responses in Message Broker Reply with quote

Newbie

Joined: 10 Jun 2013
Posts: 2

Hi,

We have a situation in which for each single request sent to the backend from a message flow we might get 10 or 14 reply messages from the backend depending on the request message but we have to send only one reply message to the frontend application. Also, we have a tag in the reply message by which we can decide if it's the last response in the series of replies. Can we use MQGET node for this? If yes, can someone clearly explain how to achive this using get message by corellation id?
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Jun 11, 2013 3:17 am    Post subject: Re: Handle Single Request - Multiple responses in Message Br Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Swathi3 wrote:
Hi,

We have a situation in which for each single request sent to the backend from a message flow we might get 10 or 14 reply messages from the backend depending on the request message but we have to send only one reply message to the frontend application. Also, we have a tag in the reply message by which we can decide if it's the last response in the series of replies. Can we use MQGET node for this? If yes, can someone clearly explain how to achive this using get message by corellation id?


1. Don't open six year-old posts. Start your own.

2. Read the InfoCentre. This is fairly basic operation.

3. Attend the nine days of Training.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Handle Single Request - Multiple responses in Message Broker
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.