micronaut-gcp icon indicating copy to clipboard operation
micronaut-gcp copied to clipboard

pubsub: Add support for subscribers backed by MessageReceiverWithAckResponse instead of MessageReceiver

Open turneand opened this issue 10 months ago • 0 comments

Feature description

Currently the micronaut gcp libraries utilise the MessageReceiver interface of the underlying Subscriber, unfortunately we are being hit by a bug in the pubsub libraries where duplicate messages are being sent even after something has been acknowledged - see https://issuetracker.google.com/330381101

The workaround we currently have is to switch the receiver used in DefaultSubscriberFactory to use a MessageReceiverWithAckResponse, but this is quite an intrusive modification of the framework, in particular when we use the reactive pubsub flows, as probably not implemented that part correctly.

What I would like to be able to do is choose either to use the default MessageReceiver, or the MessageReceiverWithAckResponse based off a config flag, but would also be ok if we need to implement our own extension of DefaultSubscriberFactory if it were able to expose some extension points.

turneand avatar Apr 19 '24 16:04 turneand