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.

Reply via email to