diff --git a/src/main/java/org/graylog2/inputs/amqp/AMQPConsumer.java b/src/main/java/org/graylog2/inputs/amqp/AMQPConsumer.java index cc476af19f89..f33a88b0ee72 100644 --- a/src/main/java/org/graylog2/inputs/amqp/AMQPConsumer.java +++ b/src/main/java/org/graylog2/inputs/amqp/AMQPConsumer.java @@ -1,5 +1,5 @@ /** - * Copyright 2012 Lennart Koopmann + * Copyright 2012, 2013 Lennart Koopmann * * This file is part of Graylog2. * @@ -223,8 +223,8 @@ public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProp channel.basicAck(envelope.getDeliveryTag(), false); handledMessages.mark(); } catch(Exception e) { - // If something breaks here it is extremely likely that it won't work next time. Ack the message. - channel.basicAck(envelope.getDeliveryTag(), false); + // If something breaks here it is extremely likely that it won't work next time. Not-Ack the message and do not requeue. + channel.basicNack(envelope.getDeliveryTag(), false, false); // YOLO LOG.error("Could not handle message from AMQP.", e); } }