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: adding a flag to force consumer to always acknowledge #446

Merged
merged 5 commits into from
Nov 28, 2023

Conversation

nicholasgriffintn
Copy link
Member

Resolves #443

Description:

As described in the issue, when we added acknowledgement some time ago, we did so in a way that broke the expected behaviour from users by changing the internal expectation of how the handlers should return and what happens as a result of that return.

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Why is this change required?:

While we can't undo this breaking change, and we can't reverse this new default behaviour (as that would be another breaking change), this change goes some way to resolve the issue by adding a feature flag that allows users to change this default behaviour, forcing the consumer to always acknowledge all messages, no matter the returned data from the handlers.

Code changes:

  • Added a new options named alwaysAcknowledge
  • The new option will default to false to maintain the current behaviour
  • If set to true, it will force the consumer to always return all message(s) from the execution, no matter what is returned from the handlers.
  • Updated the documentation to note that this option exists.

@nicholasgriffintn nicholasgriffintn added this to the 8.1.0 milestone Nov 24, 2023
Copy link

codeclimate bot commented Nov 24, 2023

Code Climate has analyzed commit eac6af2 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (80% is the threshold).

This pull request will bring the total coverage in the repository to 98.3% (0.0% change).

View more on Code Climate.

@nicholasgriffintn nicholasgriffintn merged commit 53c8599 into main Nov 28, 2023
9 checks passed
@nicholasgriffintn nicholasgriffintn deleted the feature-flag-acknowledgement branch November 28, 2023 21:21
@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Undocumented breaking change - acknowledgment to handleMessage
1 participant