# Logstash ack and persistent queue checkpoint order

**URL:** <https://discuss.elastic.co/t/logstash-ack-and-persistent-queue-checkpoint-order/317699>\
**Category:** Logstash\
**Created:** [October 28, 2022, 3:58pm UTC](https://discuss.elastic.co/t/logstash-ack-and-persistent-queue-checkpoint-order/317699 "2022-10-28T15:58:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bonyolult](https://avatars.discourse-cdn.com/v4/letter/b/e36b37/32.png) [@bonyolult](https://discuss.elastic.co/u/bonyolult)\
**Post date:** [October 28, 2022, 3:58pm UTC](https://discuss.elastic.co/t/logstash-ack-and-persistent-queue-checkpoint-order/317699/1 "2022-10-28T15:58:44Z")

</div>

Hi, read the documentation forth and back and it's not obvious when a message is acked (e.g. consuming from RabbitMQ) . Is the message acked after written to Logstash PQ or acked after reading the input source but before written to Logstash PQ?  
I know there are the queue.checkpoint.acks and queue.checkpoint.writes settings but apart from these, what is the order of persisting to PQ vs acking the message? Thank you!

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 28, 2022, 4:59pm UTC](https://discuss.elastic.co/t/logstash-ack-and-persistent-queue-checkpoint-order/317699/2 "2022-10-28T16:59:40Z")

</div>

The http plugin is documented as being well protected by a persistent queue. The [decode\_body](https://github.com/logstash-plugins/logstash-input-http/blob/9fb2f674a97be34acde2c7d234d13de914cf5a84/lib/logstash/inputs/http.rb#L175) function will have successfully called push\_decoded\_event (which adds the event to the queue) before it returns true.

My reading of the [internal\_queue\_consume!](https://github.com/logstash-plugins/logstash-input-rabbitmq/blob/04e48c218368cc7c318dfc8d934a9dd9c6fc4fb5/lib/logstash/inputs/rabbitmq.rb#L234) function in the rabbitmq input is that it does not call @hare\_info.channel.ack until it has added all the events to @output\_queue.

I may be wrong, but I think you are protected.

---

<div class="post-metadata">

**Author:** ![bonyolult](https://avatars.discourse-cdn.com/v4/letter/b/e36b37/32.png) [@bonyolult](https://discuss.elastic.co/u/bonyolult)\
**Post date:** [November 3, 2022, 2:38pm UTC](https://discuss.elastic.co/t/logstash-ack-and-persistent-queue-checkpoint-order/317699/3 "2022-11-03T14:38:24Z")

</div>

Thank you for your answer. Unfortunately i must know for sure:), so there's nothing left than downloading the source and find how PQ ack is handled...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 1, 2022, 2:38pm UTC](https://discuss.elastic.co/t/logstash-ack-and-persistent-queue-checkpoint-order/317699/4 "2022-12-01T14:38:38Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
