java - Auto-injection custom ErrorHandler in spring-rabbitmq -


we know can inject custom message converter:

@bean messageconverter messageconverter(){    return new custommessageconverter(); } 

however in case of errorhandler doesn't work. why ? can conclude code in way ?

that's true. spring boot's rabbitannotationdrivenconfiguration doesn't support injection.

you have declare own simplerabbitlistenercontainerfactory @bean , supply desired errorhandler injection, other required options, including messageconverter.

note overriding out-of-the-box bean should specify own 1 rabbitlistenercontainerfactory name meet condition:

@bean @conditionalonmissingbean(name = "rabbitlistenercontainerfactory") public simplerabbitlistenercontainerfactory rabbitlistenercontainerfactory( 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -