2008/7/15 Claus Ibsen <[EMAIL PROTECTED]>: > 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. -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com
