The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

dfry (3) [Avatar] Offline
#1
In reading the configurations for the splitter/aggregator example in ch 5.4.1 and 5.4.2, I am a little confused on how the correlation is happening in the aggregator flow.

I am assuming that whatever process dequeues the message from the lineitem.processing queue and enqueues it to the lineitem.complete queue must be copying the correlation-id between incoming and outgoing messages.

My main doubt is how does the inbound JMS endpoint selects only the messages that have the correct correlation id that would correspond to the aggregator? I don't see any message selector that is being configured nor do I see how it could be configured since the actual correlation-id was obtained in a different mule instance.

Is there some code dependency between the aggregator and the JMS endpoint that provides a message selector under the covers? or is the example too simple in that the endpoint would consume all messages on that queue, regardless of whether the correlation id had originated within a mule flow (i.e., if I send in a message via hermes to the lineitem.complete queue with a made up correlation-id) ?

Thanks
David Dossot (233) [Avatar] Offline
#2
Re: JMS Splitter/Aggregation Example Ch. 5
Great question!

There's no behind-the-scene integration between the JMS inbound endpoint and the aggregator. All JMS messages are delivered to the aggregator, which uses the correlation ID and group size to group messages together and release them as single collections.

So this example is not "too simple", that's just the way Mule works smilie
dfry (3) [Avatar] Offline
#3
Re: JMS Splitter/Aggregation Example Ch. 5
Thanks for the response David. So, if messages come in that don't match a correlation ID that the aggregator has in its store, the aggregator just drops them?
David Dossot (233) [Avatar] Offline
#4
Re: JMS Splitter/Aggregation Example Ch. 5
No, it keeps them until the aggregation times out is reached, then it drops them, logging an ERROR in the console.
dfry (3) [Avatar] Offline
#5
Re: JMS Splitter/Aggregation Example Ch. 5
I put together a solution based on this example but using AMQP instead of JMS. I don't want to use replyto temporary queues because the program that reads the split messages can't process the response message synchronously.

I have a working example using a common response queue but I am a little concerned about the way that the aggregator and corresponding splitter are linked and what to consider when confguring them to run within a clustered Mule environment.

Can you point me to any references on this?

Thanks
David Dossot (233) [Avatar] Offline
#6
Re: JMS Splitter/Aggregation Example Ch. 5
I suggest you ask this question in the MuleSoft forum, where you'll get better support regarding Mule EE (this book covers only CE, where clustering is not available) and non-core transports (AMQP is an additional transport).