Reputation: 1
I am using pubsub and I have multiple subscriber that subscribes to a topic.
When processing the message in one (or many) subscriber service, error might occur after the operation (let's say changes to database) is done and right before the message is acknowledged by the subscriber.
Which cause the subscription not receiving acknowledgement and it will retry the message to the subscriber again (but the thing is the subscriber has already done the process, only the acknowledgment that is not given).
Is there any possible way to prevent message being processed more than once for that scenario, preferably by pubsub side so I don't have to make changes to subscribers (because there are multiple subscriber services receiving messages).
I was thinking to create an independent service like message checker that will store message_id from pubsub since they are unique identifier. So, every time message is received by the subscriber, the subscriber will hit the message checker checking if specific message_id has been processed before. But I think that might cause another latency problem.
Upvotes: 0
Views: 76