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

create acker consumer with configurable ack-multiple flag #503

Merged
merged 3 commits into from Mar 31, 2021

Conversation

jbwheatley
Copy link
Collaborator

Addresses #461

  • adds a new function to rabbit client: createAckerConsumerWithMultipleFlag which returns an acker function (AckResult, AckMultiple) => F[Unit] args as oppose to createAckerConsumer's return type of AckResult => F[Unit].

  • adds an arg to createAckerConsumer to set the ack multiple flag for the entire lifetime of the created consumer.

(sorry, scalafmt rules are on a rampage since I turned it on in my ide)


trait Acking[F[_]] {
def createAcker(channel: AMQPChannel): F[AckResult => F[Unit]]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might need to mark this as deprecated first, or are we happy making it a breaking change?

We could keep the existing method as

def createAcker(channel: AMQPChannel): F[AckResult => F[Unit]] =
   createAcker(channel: AMQPChannel, AckMultiple(false))

(if we allow an overloaded name)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we can make it a breaking change, as this will go into the next major release. The API exposed by RabbitClient should remain source-compatible, so I'm not too worried.

Copy link
Collaborator

@agustafson agustafson left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jbwheatley jbwheatley force-pushed the acker-configurable-multiple-flag branch from b5e1eaa to 5e75cf5 Compare March 31, 2021 16:23
@jbwheatley jbwheatley merged commit d4b6f6e into series/4.x Mar 31, 2021
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.

None yet

2 participants