camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravi <ravi.ty...@esq.com>
Subject Re: Synchronous Routing
Date Mon, 05 Sep 2011 12:10:56 GMT
I am using DefaultConsumer which is reading row from a Database (A:reader
where A is a custom Component ). 



The code to activate Consumer is:

public Consumer createConsumer(Processor processor) throws Exception {
        return new DefaultConsumer(this, processor) {
            @Override
            public void start() throws Exception {
                super.start();
				activateConsumer(this);
            }}}

protected void activateConsumer(DefaultConsumer consumer) throws IOException 
{
	thread = new Thread() 
	{
		@Override
		public void run() {
			while(keepRunning == true)
			{
				read();
			}
		}
	};
	thread.setName("Thread: " + getEndpointUri());
	thread.setDaemon(true);
	thread.start();
}

And the CAMEL Version is 2.7.0

--
View this message in context: http://camel.465427.n5.nabble.com/Synchronous-Routing-tp4769944p4770271.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message