camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apara <>
Subject Re: LoadBalancer seems to be doing some sort of throttling
Date Fri, 22 May 2015 04:02:01 GMT
So, it turns out that the processing of simple expressions is apparently
somewhat slow (my camel routes are currently handling 2300 events/second) so
each message is taking milliseconds to get through the pipelines.  If the
load balancing calculation takes too long it cannot keep the pipelines full.

I replaced the sticky(...) specification with my own code and things are

            new QueueLoadBalancer() {
                protected Processor chooseProcessor(final List<Processor>
processors, final Exchange exchange) {
                    //Get the partition key
                    final String
                        partitionKey =

                    //Calculate the position
                    final int
                        size = processors.size(),
                        index = (partitionKey.hashCode() % size + size) %

                    //Return the processor to use

It's amazing the kind of issues you start to find at these processing
speeds.  I am quite satisfied with Camel's raw processing speed when it
comes to core message routing.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message