MeteoGroup / amqp-to-kafka

The repo has been migrated to Bitbucket https://bitbucket.org/dtnse/amqp-to-kafka/src/master/ and archived
Apache License 2.0
3 stars 2 forks source link

Why are messages are not ack'ed by default? #2

Open rhaist opened 5 years ago

rhaist commented 5 years ago

You choose to not ack delivered messages. This will fill up the queue on RabbitMQ side. Is this a bug or a feature I don't understand? 😃

https://github.com/MeteoGroup/amqp-to-kafka/blob/9582d350f7ca786b59279ad51a548251d541d2c8/amqp.go#L71

kurellajunior commented 5 years ago

That is indeed a very good question. When I remember correctly we took the example from here: https://github.com/streadway/amqp/blob/master/_examples/simple-consumer/consumer.go I am not sure about the implications of that parameter and I can not find its behaviour described.

rhaist commented 5 years ago

If you don't ack a message after you received it, it will not be deleted in the queue and the queue will grow until the maximum disk space is reached.

REF: https://www.rabbitmq.com/confirms.html#consumer-acknowledgements

kurellajunior commented 5 years ago

reading the documentation middle of page in chapter Message acknowledgement noAck=false actually means to turn off manual acknowledgements. Thus noAck=false is actually the setting to activate automatic acknowledgements. Hence all should be right (and it did work in fact quite well with that setting…)