camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: FlatPack Component - Why LoadBalancer
Date Tue, 15 Jul 2008 12:18:38 GMT
2008/7/15 Claus Ibsen <>:
> Hi
> The new component uses a loadbalancer consumer - what is the secret reason for this?
> I am asking because I am curious and I want to learn.


So an endpoint can typically have many producers and zero or more
consumers. Sometimes an endpoint just processes messages it receives
and then sends out one or more messages. There's a handy base class,
ProcessorEndpoint which kinda does this - you just provide a Processor
and it adds the producer details.

Given that usually a producer is separate to a consumer and there
could be many of each; I've often reused the LoadBalancer abstraction
which represents all the consumers. (It could be just one or several)
- and chooses how to load balance requests across the given consumers.
In many cases where there is just one producer and one consumer then
it will just invoke the consumer - but if ever you created a number of
consumers you might want some kinda load balancing etc.


Open Source Integration

View raw message