camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Load testing
Date Wed, 04 May 2011 05:10:21 GMT
On Wed, May 4, 2011 at 6:53 AM, Muhammad Ichsan <ichsan@gmail.com> wrote:
> On Wed, May 4, 2011 at 11:27 AM, boday <ben.oday@initekconsulting.com> 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
http://camel.apache.org/log

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
exchange.

Also Mock component have some expectations you can use for setting up
expectations for arrival times (see bottom of link)
http://camel.apache.org/mock
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
> http://michsan.web.id 一緒に勉強しましょう!
>
> Yang berkualitas memang beda rasanya!
> http://rizqi-cookies.com
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message