You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "steven.marcus" <st...@gmail.com> on 2008/02/16 02:05:19 UTC

Re: seda broken in latest snapshot?

There was supposed to be a ? at the end of the subject!

It might be that the execution dynamics of the seda client have changed at
the default queue size of 1000 is now no longer sufficient.

However, a couple of questions about SedaConsumer:

   public void run() {
        while (isRunAllowed()) {
            final Exchange exchange;
            try {
                exchange = endpoint.getQueue().poll(1000,
TimeUnit.MILLISECONDS);
            } catch (InterruptedException e) {
                break;
            }
            if (exchange != null && isRunAllowed()) {
                processor.process(exchange, new AsyncCallback() {
                    public void done(boolean sync) {
                    }
                });
            }
        }
    }

Is there a need to be concerned about abnormal consumer thread termination?
The code in processor.process might throw an exception and kill the seda
queue.
Logging might be useful at a minimum.

Also, are "spurious interrupts" still a concern? If so, continue would be
better than break to exit only if isRunAllowed() says so to do...

catch (InterruptedException e) {
                continue; // break;
            }

thanks again for camel!

-- 
View this message in context: http://www.nabble.com/seda-broken-in-latest-snapshot-tp15510480s22882p15513400.html
Sent from the Camel - Users mailing list archive at Nabble.com.