Authentication Failure Notifications


AMQP 0-9-1 requires brokers to close the TCP connection if an authentication failure occurs during connection establishment. This makes it difficult for clients to distinguish such authentication failures from genuine network interruptions during the early stages of connection establishment.

RabbitMQ offers explicit authentication failure notifications for clients that advertise their capacity to receive such notifications.

How it Works

The broker will report failures differently depending on the presence of the authentication_failure_close capability. If this capability is absent then authentication failures are reported in the legacy fashion: by abruptly closing the network connection. If this capability is present then the broker will send a connection.close command to the client indicating ACCESS_REFUSED as the reason. The broker will create a log entry for the authentication failure in either case.

Getting Help and Providing Feedback

If you have questions about the contents of this guide or any other topic related to RabbitMQ, don't hesitate to ask them on the RabbitMQ mailing list.

Help Us Improve the Docs <3

If you'd like to contribute an improvement to the site, its source is available on GitHub. Simply fork the repository and submit a pull request. Thank you!