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

python - PyInstaller UAC not working in onefile mode -

python - RuntimeError: can't re-enter readline -

php - Need to store a large amount of data in session with CI 3 but on storing large data in session it is itself destorying automatically -