camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Load testing
Date Wed, 04 May 2011 05:10:21 GMT
On Wed, May 4, 2011 at 6:53 AM, Muhammad Ichsan <> wrote:
> On Wed, May 4, 2011 at 11:27 AM, boday <> wrote:
>> here are a few links that might help...
> Thanks!
> But, how about time limitation? I need to make sure that when sending
> 100 messages in concurrency 20 into a 5s processor, camel can process
> 20 messages in 5s.

You just time the test. Either a test kit can time that for you. (like JMeter)

Or you may write a piece of code to time that yourself.
Camel also has a StopWatch code in org.apache.camel.util you can use.

The log component can also print out some timing info

If you use the groupSize or groupInterval option.
But thats just for logging, it wont cause the test to fail.

When Camel starts processing an Exchange it stores a timestamp on it
as a property with the key Exchange.CREATED_TIMESTAMP. You can use
that information to know how long time it takes to process the

Also Mock component have some expectations you can use for setting up
expectations for arrival times (see bottom of link)
You can write something that the last message should arrive no later
than X time before the first message.

Mind that mock endpoints store a copy of the exchange in memory, so if
you do load testing with 1000000 of messages it would eat up memory.
And cause a degrade in performance.

> --
> ~The best men are men who benefit to others
> 一緒に勉強しましょう!
> Yang berkualitas memang beda rasanya!

Claus Ibsen
CamelOne 2011:
Twitter: davsclaus
Author of Camel in Action:

View raw message