camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edwin <>
Subject Re: Camel Component - Consumer Threading Question
Date Tue, 12 Jun 2012 16:36:44 GMT

My consumer monitors the state of a vendor product via an API which the
vendor provides.

My consumer needs to run in its own thread. The logic in the consumer method
will look something like:

MyConsumer extends DefaultConsumer{

	public void method1(){
		vendorStatsOK = true;
		while (vendorStatsOK){
                        //BLOCKING CALL
			Message msg = VendorAPI.waitForMessage();
                        Exchange exchange = endpoint.createExchange();


Since the call to the vendor API is a blocking call, I am thinking the
ScheduledPollConsumer is not a good fit. I cannot use the event driven
consumer either as the vendor product will not invoke my method

Hence, I am trying to figure out the best way to have my consumer run its
own thread, i.e. have method1 invoked in a separate thread.


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

View raw message