@Steve
I'm fairly certain the ProducerTemplate is simply an object and doesn't
have its own separate thread. That would create a lot of different
problems given the nature of the methods on the ProducerTemplate and the
@EndpointInject.
Even when you make async calls using it the PT uses an
Thanks a ton everyone, I was able to achieve it by using split and by writing
a custom bean/method.
--
View this message in context:
http://camel.465427.n5.nabble.com/Dynamic-routing-based-on-collection-values-tp5789157p5789282.html
Sent from the Camel - Users mailing list archive at
And, by default, that is a lot of threads that are not needed for his use
case. Though I am not sure how many threads are created vs used when you
are doing a recipient list and a splitter.
On Mon, Oct 24, 2016 at 2:51 PM, Brad Johnson
wrote:
> How many producer
How many producer templates would be produced? There's only a single
handler instantiated so if there are 5 routes that's 5 producer templates.
On Mon, Oct 24, 2016 at 1:32 PM, Steve973 wrote:
> I'd worry about the overhead of creating so many producer templates. I
> would
I'd worry about the overhead of creating so many producer templates. I
would probably set a header that contains a map of keys to destinations,
then you could set a recipient list of one endpoint that contains the value
at that key. Maybe brad's method isn't as overhead intensive because the
This is also one of those fuzzy areas where sometimes it is easier to
simply pass the message body into a bean and then use ProducerTemplate
instances to send values us different routes. Under normal circumstances I
wouldn't do it that way as Camel does a great job of heavy lifting. But in
some
Thanks a lot for the response. This seems like useful, I'll give out a try
and will update you accordingly.
Best,
Raghavender Anthwar
--
View this message in context:
http://camel.465427.n5.nabble.com/Dynamic-routing-based-on-collection-values-tp5789157p5789179.html
Sent from the Camel -
Here an example what I unterstood.
Jan
package de.materne.camel;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.apache.camel.EndpointInject;
import org.apache.camel.RoutesBuilder;
import org.apache.camel.builder.RouteBuilder;
import
Basically I've the map that was mentioned in the post as input in the
incoming message. And I wanted to iterate over each key of the map and send
it as input to different endpoint based on the key value.
Yes, it's kind of content based routing but the content is a collection
here.
--
View this
So you want to split [1] the list into Key-Value-Pairs and do a content
based routing [2]?
Jan
[1] http://camel.apache.org/splitter.html
[2] http://camel.apache.org/content-based-router.html
> -Ursprüngliche Nachricht-
> Von: raghavender.anth...@gmail.com
>
10 matches
Mail list logo