Closed thayhoang closed 3 years ago
I think it should be neither acked on nacked, according to our documentation. Which version of the project are you using? cc/ @elefeint
I think it should be neither acked on nacked, according to our documentation. Which version of the project are you using? cc/ @elefeint
"I think it should be neither acked on nacked" -> I think it should be too, then the message passed the acknowledgement deadline and my app can start consume it again. But it disappeared. I'm using spring boot version 2.2.4.RELEASE. You can check out my source code: https://github.com/thayhoang/pubsub-demo
@thayhoang AUTO_ACK mode is default, so the adapter acknowledges the message as long as it was successfully handed off to a Spring Integration channel. The behavior you are looking for is more consistent with MANUAL mode; here is how to configure it: https://github.com/spring-cloud/spring-cloud-gcp/blob/master/docs/src/main/asciidoc/spring-stream.adoc#consumer-destination-configuration
@elefeint
Correct me if I'm wrong. The documentation mention the default mode is AUTO. which should nack the message when there's an exception.
I was wrong that the adapter should ACK upon handing off to Spring Integration -- the logic is synchronous, so any exceptions in the handler should result in nack()
.
@thayhoang I can reproduce the outstanding messages count going down when the demo app is shut down. This is very odd, and should not be happening; I will look into it more.
@elefeint When will this fix be available for production?
There is no date for Hoxton.SR10 release yet (SR9 was released mid-November, so likely some time in January), but we will be releasing the new major version from the new repo first thing in January.
The workaround will be forward-ported by then.
Thank you for identifying the issue!
I'm using spring cloud stream google pubsub. Here my consumer class
my configuration
When my application sleeping Thread.sleep(100000), I'm shutting down the application (using IntelliJ). I got the exeption
At this point, I'd expect the message been nack and when I start the application again it can start consume it again. But the message disappeared. I've also check the google console and see it has been acked. Is this a bug?
My code: https://github.com/thayhoang/pubsub-demo