1. In SedaEndpoint.process(Exchange exchange, AsyncCallback callback)
method.   I wouldn't expect callback.done() to be invoked immediately
when an exchange is enqueued.  (right?) But rather I would expect
callbacks are enqueued with the exchanges so that when the
SedaConsumer can invoke them after their corresponding exchanges are
processed.

2. In the SedaConsumer.run() method.  I think the two checks for
"!isStopping()" should be modified to: "!isStopping() &&
!isStopped()".  Otherwise, the consumer's thread can run forever since
it is possible for ServiceSupport.stop()  to change the stopping flag
to true and back to false before the consumer's thread has a chance to
check the stopping flag.

Regards,
William

Reply via email to