Reputation: 69
Hi I am struggling to find a documentation where I can poll more than one channel (say 2 pubsub topic or 2 files or 2 jms topic etc.) and then combine the messages into one .The intention is to summarize the multiple messages from the different channels into one message.
I know aggregation in camel will allow me to combine more than one messages into one.But how to aggregate when the two(or more) messages are from different channel.
Please point me to a link/documentation and I will figure out the rest.
thanks manjith
Upvotes: 2
Views: 259
Reputation:
Camel does not have a composite message source like mule where you can put sources. So you will have to start two routes and then merge them.
Upvotes: 0
Reputation: 8203
you can achieve it using Segmented routes approach. Here I am using direct channel, but you can use seda or vm as well. Please note
from("input-source-1").to("direct:composite-source");
from("input-source-2").to("direct:composite-source");
from("direct:composite-source")
....;
Please note the following approach is deprecated in camel 3. (https://camel.apache.org/manual/latest/camel-3-migration-guide.html)
from("URI1", "URI2", "URI3").to("DestinationUri");
Upvotes: 0