-
Notifications
You must be signed in to change notification settings - Fork 626
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
Exclusive Consumer Logging Improvements #2536
Comments
This is a reasonable request, but consider setting Single Active Consumer on the queue rather than using exclusive consumers; it is more efficient and avoids this problem. https://www.rabbitmq.com/consumers.html#single-active-consumer
|
By the way, the WARN log can be avoided by setting a custom logger here: /**
* Set a {@link ConditionalExceptionLogger} for logging exclusive consumer failures. The
* default is to log such failures at WARN level.
* @param exclusiveConsumerExceptionLogger the conditional exception logger.
* @since 1.5
*/
public void setExclusiveConsumerExceptionLogger(ConditionalExceptionLogger exclusiveConsumerExceptionLogger) { The INFO logs for the restart can be avoided by setting the container's logger level to WARN. |
There is also a /**
* Set the strategy for logging close exceptions; by default, if a channel is closed due to a failed
* passive queue declaration, it is logged at debug level. Normal channel closes (200 OK) are not
* logged. All others are logged at ERROR level (unless access is refused due to an exclusive consumer
* condition, in which case, it is logged at INFO level).
* @param closeExceptionLogger the {@link ConditionalExceptionLogger}.
* @since 1.5
*/
public void setCloseExceptionLogger(ConditionalExceptionLogger closeExceptionLogger) { |
Resolves spring-projects#2536 Log messages due to access refused due to exclusive consumers at DEBUG level instead of WARN and INFO.
Resolves spring-projects#2536 Log messages due to access refused due to exclusive consumers at DEBUG level instead of WARN and INFO.
Resolves spring-projects#2536 Log messages due to access refused due to exclusive consumers at DEBUG level instead of WARN and INFO.
Resolves spring-projects#2536 Log messages due to access refused due to exclusive consumers at DEBUG level instead of WARN and INFO.
Resolves spring-projects#2536 Log messages due to access refused due to exclusive consumers at DEBUG level instead of WARN and INFO.
Resolves spring-projects#2536 Log messages due to access refused due to exclusive consumers at DEBUG level instead of WARN and INFO.
Resolves #2536 Log messages due to access refused due to exclusive consumers at DEBUG level instead of WARN and INFO. * Use LogMessage to avoid enabled check. * Use LogMessage at INFO level too.
When the consumer is set to exclusive and multiple instances are started, the console continuously outputs info level restart consumers log.
When setting consumers as exclusive and bound, the restart log level for other consumers should be TRACE or DEBUG.
https://github.com/zhangheng0027/testRabbitMQ.git
The text was updated successfully, but these errors were encountered: