Skip to content

RabbitMQ messages requeued by default in case of error, in contradiction with the docs #1141

@rthouvenin

Description

@rthouvenin

The README of the rabbitmq package says that the default error handling behaviour is to nack messages without requeue:

The default is `defaultNackErrorHandler` and it just nack the message without requeue (which is usually ok to avoid the message coming back in the queue again and again)

However the behavior that I observed in my app is that messages are re-queued, causing an infinite loop. And I think if I understand the code correctly, this is indeed what's currently coded, as the base default config has defaultSubscribeErrorBehavior = MessageHandlerErrorBehavior.REQUEUE:

defaultSubscribeErrorBehavior: MessageHandlerErrorBehavior.REQUEUE,

This discrepancy is confusing. I'm happy to submit a PR, but not sure which is the desired outcome: fix the documentation or change the code to match the documentation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions