How does these two differ
from(endpoint).to(endpoint:a, endpoint:b)
from(endpoint).multicast().to(endpoint:a, endpoint:b)
couldn't find any documentation for the first
to(endpoint:a, endpoint:b)
is equivalent to .to(endpoint:a).to(endpoint:b)
This means that the output from endpoint:a
is sent to endpoint:b
, not the original Exchange
. Also, each endpoint is executed one after the other.
.multicast()
sends the original Exchange
to each defined endpoint, allows for parallel processing, and allows you to define an AggregationStrategy to determine how to assemble the responses from each endpoint the original Exchange
was sent to.