Hi,
I am creating my own custom endpoint using Camel 1.5

public class AbcEndpoint extends DefaultEndpoint {
public Consumer createConsumer(Processor processor) throws Exception {
            Consumer c=new AbcConsumer(this,processor);
            return c;
      }
.....
}

public class AbcConsumer extends DefaultConsumer<DefaultExchange>
{
protected void doStart() throws Exception {..do something...}
protected void doStop() throws Exception {--do something--}
}

When is start the context for the 1st time, 1 consumer is created, when I stop 
it and start it again, createConsumer() is called 2 times and so on.
Do I have to do something to avoid this behavior. The problem is in the 
doStart() method of the Consumer, I am creating my own threads. Now since 
createConsumer() is being 2 times, doStart() is being called 2 times and 
multiple threads are being created.





Reply via email to