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 » Variable # of Messages for Aggregation/Collection

Post new topic  Reply to topic Goto page 1, 2  Next
 Variable # of Messages for Aggregation/Collection « View previous topic :: View next topic » 
Author Message
psiracusa
PostPosted: Thu Apr 15, 2010 9:20 am    Post subject: Variable # of Messages for Aggregation/Collection Reply with quote

Apprentice

Joined: 17 Nov 2006
Posts: 34

I've been looking at the collector and aggregator nodes to try and solve a problem we are going to soon have, and that is how to aggregate X number of replies. X won't be known until runtime. Sometimes it will be 3, sometimes 10 etc. and it seems to me like the collection and aggregation suite won't combine the messages based on a dynamic number. Using the timout isn't an option either because the response needs to be sub-second. Anyone have a good solution for this? Any help is much appreciated.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Apr 15, 2010 10:17 am    Post subject: Reply with quote

Grand High Poobah

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

I'd have thought both would handle this because both know at runtime how many requests they've said. I'd certainly have thought the collector (which is less fiddly than aggrigation) could have handled that.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
psiracusa
PostPosted: Thu Apr 15, 2010 10:39 am    Post subject: Reply with quote

Apprentice

Joined: 17 Nov 2006
Posts: 34

Let me rephrase that then and say X number of requests (and therefore X number of replies). In the collection definition, you have to define the quantity of messages before the node aggregates the data. In this case we don't know the quantity until runtime and the quantity field won't take a variable.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Apr 15, 2010 10:52 am    Post subject: Reply with quote

Grand High Poobah

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

Ok, I'll confess here and now I've not worked a lot with the Collector node so I might be talking out of something other than my mouth.

But surely an unknown number of reponses is still a complete collection and the node can be set to assemble the responses until the collection is complete? It might not be possible to have a collection that's made up of the next X responses, but presumably that's a feature not a problem if there are multiple request sets in play? You'd actually want the 2 sets kept separate by id?

Anybody want to comment on what I've got wrong, just jump right in...
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Apr 15, 2010 10:59 am    Post subject: Reply with quote

Grand High Poobah

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

Thinking about it, doesn't even the aggrigation node manage by setting the request up with a given name (folder name?) and the request msg id as correlation? So that would handle the unknown number of response problem as well surely?

I'm clearly missing something and/or have the wrong end of the stick. It happens, and I'm braced & ready to be embarrased when someone corrects me.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Apr 15, 2010 12:15 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Vitor wrote:
Thinking about it, doesn't even the aggrigation node manage by setting the request up with a given name (folder name?) and the request msg id as correlation? So that would handle the unknown number of response problem as well surely?

I'm clearly missing something and/or have the wrong end of the stick. It happens, and I'm braced & ready to be embarrased when someone corrects me.

I thought the aggregation node expected only a single response from each aggregation source. Don't know how that would play with a group...( probably all msgs in group with logical msg?)... but those settings would have to be put onto the MQInput node...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
psiracusa
PostPosted: Thu Apr 15, 2010 12:25 pm    Post subject: Reply with quote

Apprentice

Joined: 17 Nov 2006
Posts: 34

Right. Same thing with the collector. One response per output. If I figure something out I'll let you know.
Back to top
View user's profile Send private message
bdebruin
PostPosted: Thu Apr 15, 2010 12:48 pm    Post subject: Reply with quote

Novice

Joined: 14 Apr 2010
Posts: 12

Do you have the WTX node?

You can use WTX to concatenate vs the collector node. In the map your first input is wired to card 1 and output would have one wired card with two items/fields in a group. The first field passes the input from card 1 and the second item/field would do a GET to get the file from a directory or message from a queue.

We had a process that took several hours using the collector node, but with WTX it runs in a few minutes. It seems to be much less complicated, but I'm more of a WTX guy.
Back to top
View user's profile Send private message
munnster
PostPosted: Thu Apr 15, 2010 7:18 pm    Post subject: Reply with quote

Newbie

Joined: 10 Mar 2010
Posts: 5

fjb_saper wrote:
Vitor wrote:
Thinking about it, doesn't even the aggrigation node manage by setting the request up with a given name (folder name?) and the request msg id as correlation? So that would handle the unknown number of response problem as well surely?

I'm clearly missing something and/or have the wrong end of the stick. It happens, and I'm braced & ready to be embarrased when someone corrects me.

I thought the aggregation node expected only a single response from each aggregation source. Don't know how that would play with a group...( probably all msgs in group with logical msg?)... but those settings would have to be put onto the MQInput node...

Have fun

The aggregation node can handle multiple request/response pairs for each aggregation source. It just repeats the specified folder as many times as necessary.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Apr 15, 2010 11:08 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

munnster wrote:
fjb_saper wrote:

I thought the aggregation node expected only a single response from each aggregation source. Don't know how that would play with a group...( probably all msgs in group with logical msg?)... but those settings would have to be put onto the MQInput node...

Have fun

The aggregation node can handle multiple request/response pairs for each aggregation source. It just repeats the specified folder as many times as necessary.

I had never tried it that way. Thanks for the clarification.
I guess the multiple responses need all to come in before the slowest source or timeout. When the 1st message from the slowest source or the timeout occurs the aggregation will propagate...
I am assuming here that we are not talking about a message group being sent by one of the sources.

In case of a message group I can see the aggregation waiting until the group is complete or timeout and passing multiple folders one per message in the group... Does it pass all of the group or none of the group or would it pass a partial group if the timeout occurred in the middle of the group?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
hallmark
PostPosted: Fri Apr 16, 2010 12:44 am    Post subject: Reply with quote

Voyager

Joined: 10 Mar 2005
Posts: 76

Hi

Just out of interest are all the replies from the same system. Are you able to use MQ grouping to logically group your replies?


EDIT: Should have read the above post first, sorry

Rob
_________________
Rob
Back to top
View user's profile Send private message
er_pankajgupta84
PostPosted: Tue Feb 21, 2012 12:51 pm    Post subject: Reply with quote

Master

Joined: 14 Nov 2008
Posts: 203
Location: charlotte,NC, USA

I also have a similar situation.

Here is the requirement:

It is advance version of pub/sub where each subscriber would want some transformation to be done to its message.

Number of publisher =1.
Number of subscriber = n (not known untill runtime)

So one message will come to broker from an external client (CLIENT A) and same message should go to all the subscriber in the corresponding format. Each subscriber will reply with an acknowledgement to the message it got. Once all the messages have been sent to all the subscribers then collate all the acknowledgement from all the subscriber and send a consolidated response to client (CLIENT A).

I can implement this in a sequential manner i.e create one request and then send it to the subscriber and store the response in environment and repeat the process for each subcriber. Then at last combine the response from the environment into one message and send it back to original client.

But this way I am limiting my processing with the response time of the subscribers.
Is there better way of doing this?

How about using Aggregation nodes in recursion i.e starting a new aggregation for each third subscriber for example:

MqInput -> Compute -> AggregationControl -> Compute -> MQOutput -> AggregationRequest
-> "After AggregationControl Node " -> Compute -> MQOutput -> AggregationRequest
-> "After AggregationControl Node " -> Filter -> MQOutput -> AggregationRequest

Where the MQOutput node attached to the last (Filter) node is the same Q as that of MqInput.

Compute Node which is attached to MqInput node will take care of these things:

1. If the incoming message is the alone subscriber than simply reply using the MQReply node (Not mentioned above)
2. Do the lookup in the db to find the list of subscriber
3. Set the properties for transformation.
4. Other stuff related to recursion.

Similarly we can have a recursive Aggregation Reply flow.

I am not trying to be over ambitious here. Just wanted some expert advice before trying this POC.[/img]
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Vitor
PostPosted: Tue Feb 21, 2012 1:19 pm    Post subject: Reply with quote

Grand High Poobah

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

Well, I don't know about a better way but if the number of subscribers is unknown until runtime you could consider a Collector node something like this:

- lookup the list of subscribers in the db
- send a transformed message for each subscriber, each message with the same correl id, storing the list of subscribers in a shared row variable for speed (or in the db if you prefer, or solidDb, or a Java singelton, or scratched on the inside of the server, or ... )
- use a Collector node to assemble all the replies by correl id
- send the results to the publisher using the shared row / db /singleton / scratches to identify missing responses

Or something like that.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Feb 21, 2012 1:22 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

If each subscriber wants or needs a unique transformation on the message, than you are in for a world of hurt. There's no way with base MQ pub/sub for a subscriber to indicate a transformation method.

You can use Subscription Points with Broker Publication nodes if there is a fixed set of transformations that is needed. You would then perform each transformation and send it to the relevant publication node. Each subscriber would know which subscription point had the transformed content it needed.

However using any kind of pub/sub properly isolates the publisher from the subscribers. There's no way to determine that there were any more than no subscribers at all.

So you don't have any fixed information about how many people received each type of message, and thus you have no way to determine if the set of responses received is the last set.

If you are not using real publish/subscribe, but instead implementing your own pub/sub engine using distribution lists or etc, then it's a different story.

You would use standard aggregation techniques that are not recursive, and use a separate flow to receive the responses than to send the requests. This gives you the scalability you're looking for, where you send all requests asynchronously from processing the responses.

But you have a big pile of requirements that need careful analysis and design, and you're not going to get that here.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Feb 21, 2012 1:39 pm    Post subject: Reply with quote

Jedi Knight

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

People should really start new threads rather than reopen ones that are two years old. THAT MEANS YOU er_pankajgupta84. (third years-old thread you have reopened this week).

The WTX comment above is degated by the fact that people should not develop new flows with WTX any more.

Reopening the thread does not serve new users well.
_________________
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 Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Variable # of Messages for Aggregation/Collection
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.