简体   繁体   中英

How to prevent 'Retry Policy Exhausted' Exception to be print in console of spring boot?

I am using spring boot and I am trying to get my own messages on console file if any exception occurs. But I am getting also other messages too from RabbitMQ like:

org.springframework.amqp.rabbit.support.ListenerExecutionFailedException

org.springframework.amqp.rabbit.support.ListenerExecutionFailedException: Retry Policy Exhausted

Caused by: org.springframework.amqp.AmqpRejectAndDontRequeueException: null

These are the messages which I don't want to be print on log file because it will make log file messy and contains more memory.

Is there any way to prevent from these messages to not to be printed.

Why are you getting this error? Maybe you need to fix that error so that this log do not appear.

But still if you want to turn off this log then add this logger in your logback.xml to turn off logging from that class

<logger name="org.springframework.amqp.rabbit.retry" level="OFF"/>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM