Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the sample below we consume messages from the activemq queue foo and want to send the same message to both seda:foo and seda:bar. Sending the same message requires that we use Multicast. This is done by adding the multicast() before the to type:

Code Block
java
java
from("activemq:queue:foo").multicast().to("seda:foo", "seda:bar");
Warningtip
titlePipeline is default in Camel

If you have a route such as:

Code Block
java
java
from("activemq:queue:foo").to("seda:foo", "seda:bar");

It is default a pipeline in Camel (that is the opposite to Multicast). In the above example using pipes and filters then the result from seda:foo is sent to seda:bar, ie. its not the same message sent to multiple destinations, but a sent through a chain (the pipes and the filters).