Skip to content

fix(microservices): send rmq nack without matching message handler#12974

Merged
kamilmysliwiec merged 1 commit intonestjs:masterfrom
toxol:rmq-nack-when-no-message-handler
Feb 7, 2024
Merged

fix(microservices): send rmq nack without matching message handler#12974
kamilmysliwiec merged 1 commit intonestjs:masterfrom
toxol:rmq-nack-when-no-message-handler

Conversation

@toxol
Copy link
Copy Markdown
Contributor

@toxol toxol commented Dec 29, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

Same problem as descibed in issue 11641 but for messages (not events).

With RMQ Options:

  • prefetchCount: 1
  • noAck: false

When you send a message (using client.send()) with an unknown pattern, the server does not send an acknowledgment. The message remains unacknowledged. Application reaches prefetch count and freezes.

Minimum reproduction code - https://github.com/toxol/nest-rmq-nack

What is the new behavior?

When RMQ server receives a message for which there is no handler, it will send a negative acknowledgment without retrying.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 94e229fb-3dc9-4b6c-963d-297f38640fd3

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 92.105%

Totals Coverage Status
Change from base Build 7ac098a9-c60b-4faa-9612-e3dbed2e2eb6: 0.005%
Covered Lines: 6720
Relevant Lines: 7296

💛 - Coveralls

@kamilmysliwiec kamilmysliwiec merged commit a58f6a9 into nestjs:master Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants