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

feat: export AckOnSuccess as server.SubscriberOption #125

Merged
merged 2 commits into from
Nov 24, 2023

Conversation

quexer
Copy link
Contributor

@quexer quexer commented Oct 22, 2023

In order to enhance MQ's reliability, it is sometimes necessary to disable auto acknowledgment.
If this option can be utilized alongside with rabbitmq.ServerAckOnSuccess(), then there will be no need for the user to manually acknowledge the message.

...

micro.RegisterSubscriber(
  topic, 
  microServer, 
  eventHandler, 
  server.SubscriberQueue(name), 
  server.DisableAutoAck(), // disable auto ack
  rabbitmq.ServerAckOnSuccess(), // only ack in case handling without err
)
...

@quexer
Copy link
Contributor Author

quexer commented Oct 26, 2023

@jochumdev could you pls review and merge this pr ? thanks

Copy link
Contributor

@jochumdev jochumdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@jochumdev jochumdev merged commit 54179a1 into micro:main Nov 24, 2023
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants