On Wed, May 4, 2011 at 6:53 AM, Muhammad Ichsan <ich...@gmail.com> wrote:
> On Wed, May 4, 2011 at 11:27 AM, boday <ben.o...@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: cib...@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/

Reply via email to