Domanda

I have recently started using Camel with Esper. I know from the documentation that some Camel patterns, like Multicast, for example, can be run using the parallelProcessing method, which creates a pool of 10 threads to run that pattern by default.

After reading the camel / esper page I did not see anything about using Esper in Camel with parallelProcessing.

My question is, can I run Esper in Camel using some sort of parallel processing? If yes how?

È stato utile?

Soluzione

Multicast is kind of different problem solver. It belongs only to ongoing flow. It just means that message from that point will be propagated to other components unchanged and in parallel behavior. Opposite is Pipeline component.

I think, what do you want is a seda component. Opposite to seda is direct component. If you send a message to direct it will flow trough and start another flow only when the first ends. If you send a message to seda it will start a new flow every time it receive a message. You can define flow/thread pool and some other parameters how to behave.

So your camel config would look like this:

from("esper:xxx").to("seda:process");
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top