1

I have a subscription in Google Pub/Sub where messages can be either acknowledged (acked) or not acknowledged (nacked). To handle the at-least-once delivery guarantee of Pub/Sub, I use an idempotent store to deduplicate messages that are delivered multiple times.

Currently, I nack duplicate messages. However, I'm curious: if I process a message that was previously in progress and then successfully ack it, will this acknowledgment also apply to the duplicate messages that I had nacked earlier?

I haven't found any related documentation. Any clarification on this behavior would be greatly appreciated.

1 Answer 1

2

Duplicate messages should be acked, not nacked. There is no guarantee that acking one instance of a message's delivery will result in the acknowledgement of all deliveries and could result in continued redeliveries of the message. If you receive duplicates while you are still processing a message, it is best to keep track of the deliveries and acknowledge them all once processing is complete.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.