use of com.rabbitmq.client.impl.ForgivingExceptionHandler in project rabbitmq-java-client by rabbitmq.
the class ExceptionHandling method forgivingConsumerHandleConsumerException.
@Test
public void forgivingConsumerHandleConsumerException() throws IOException, InterruptedException, TimeoutException {
final CountDownLatch latch = new CountDownLatch(1);
final ExceptionHandler eh = new ForgivingExceptionHandler() {
@Override
public void handleConsumerException(Channel channel, Throwable exception, Consumer consumer, String consumerTag, String methodName) {
super.handleConsumerException(channel, exception, consumer, consumerTag, methodName);
latch.countDown();
}
};
testConsumerHandleConsumerException(eh, latch, false);
}
Aggregations