Glamdring
Oct 3rd, 2011, 08:05 AM
Currently, when there is an exception in a listener, the container's BlockingQueueConsumer does this:
channel.basicReject(deliveryTag, true);
However, we want to send requeue=false in these cases. An additional requirement is to send failed messages to a separate queue ("failed.messages").
Currently I implemented that by copy-pasting a couple of spring-rabbit/amqp classes and changed the desired pieces of code, but that's ugly. Any better approach?
channel.basicReject(deliveryTag, true);
However, we want to send requeue=false in these cases. An additional requirement is to send failed messages to a separate queue ("failed.messages").
Currently I implemented that by copy-pasting a couple of spring-rabbit/amqp classes and changed the desired pieces of code, but that's ugly. Any better approach?