Hi,

There's obviously a difference in how the wireTap()-processor handles
exceptions in 2.9.0 and 2.9.1/2.9.2.
In 2.9.0, when the wireTap() encounters a RejectedExecutionException on its
ExecutorService, the exception is swallowed.
In 2.9.1/2.9.2 the exception is propagated to the errorHandler of the route.
Is this by intention? Makes upgrading kind of difficult for me...

The following test works with 2.9.0 but not 2.9.1/2.9.2:

    @Test
    public void wireTapWithExecutorService() throws Exception {
    CamelContext context = new DefaultCamelContext();
    context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:test").wireTap("mock:test").executorService(createRejectingExecutor());
}
    });
    context.start();
    context.createProducerTemplate().requestBody("direct:test", "TESTING");
    }

    private ExecutorService createRejectingExecutor() {
    ExecutorService executorService = new ThreadPoolExecutor(0, 1, 60,
TimeUnit.SECONDS, new SynchronousQueue<Runnable>());
    executorService.execute(new Runnable() {
    @Override
    public void run() {
    try {
    Thread.sleep(Long.MAX_VALUE);
    } catch (InterruptedException e) {
    }
    }
    });
    return executorService;
    }

Takk,
Thomas

Reply via email to