Skip to content
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

Resume after shutdown always fetch last interrupted message again #437

Open
chingkamhing opened this issue Apr 25, 2024 · 0 comments
Open

Comments

@chingkamhing
Copy link

chingkamhing commented Apr 25, 2024

Condition:

  • pub/sub provider use redis
  • use message router to handle all the message handler
  • publish 10 messages
  • handler function takes 5 seconds to process
  • Ctrl+C the pubsub server after successfully processed first message
  • during shutdown, 1 pending message (e.g. msg 2) is successfully processed (i.e. returned nil error in handler)
  • pubsub server finished shutdown after the pending message is handled
  • restart pubsub server, success to resume process the rest of the messages

Problem

  • although the pending message (i.e. msg 2) was processed successfully before shutdown, the same message is fetched again after resume (i.e. msg 2 is incorrectly processed twice)

Attempts to fix but the problem still the same:

  • tried to increase the message.RouterConfig CloseTimeout to something like 30s
  • tried manually acknowledge the message in handler

Question:
Just wonder how to avoid the successfully handled message from being fetched again after resume? Did I miss any setting?

Thanks,
Kam Ching

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant