-
Notifications
You must be signed in to change notification settings - Fork 813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pubsub: add support for extending ACK deadline #3507
Comments
Ack; we've considered this before (#3507). |
@vangent Ahhhhh, thanks for your response, I guess you mean #3130? And that I saw the reason, but in my case, it feels weird to open another Or could it be an option in For url := "gcppubsub://...?MaxExtension=3000" // sec |
You can certainly do this with
#3507 was more about modifying the |
Awesome, thanks for pointing out the
|
If you're happy with that solution, great. I'll add an example and call this done. While it does seem possible to have the |
Is your feature request related to a problem? Please describe.
I guess I have to start with the differences between AWS SQS and GCP Pub/Sub, here are what I think are the more significant differences between them
Ack
queue message after thevisibility timeout
is exceeded.Ack Deadline
is exceeded, ourAck
operation will fail.visibility timeout
of SQS is 12 hours.Ack deadline
of Pub/Sub is 10 minutes.So here is my current situation, I'm migrating our library from the AWS SDK to go-cloud to invoke Pub/Sub. (Eventually I would like to make it works like a
multi-cloud
/multi-queue-service
support.) (Btw, I really have to say, go-cloud is truly amazing. 😄 )But, the design logic in all my previous services was basically Queue-message-driven. I usually poll the message first and then start processing the message. When the processing is completed, I would decide whether to
Ack
orNack
.I know that though they are essentially different services, the above differences are too huge, so when processing some time-consuming requests, 10 minutes is often not enough. (Pub/Sub also not allow us to
Ack
after reached the deadline. 😔 )In the end my service usually can handle that message successfully, but because that message cannot be correctly
Ack
ed, that message will be judged as a processing failure by Pub/Sub, and will eventually be automatically transferred to the dead letter topic.Describe the solution you'd like
So I hope
go-cloud
can add a new method to extendAck deadline
.Describe alternatives you've considered
The alternative I guess would be
For polling:
(Ah, a point just came into my mind. In that case, why don't I just stop using Pub/Sub in the first place? Eventually I still have to rewrite the entire message queue mechanism.)
For handling:
(However, there is still a problem. If it
panic
, the whole thing will be ruined, so another thing may be needed to provide to prevent that request from disappearing forever afterpanic
ing.)Additional context
Sorry, I seem to have written context in the wrong place, please refer to above.
The text was updated successfully, but these errors were encountered: