解决ListenerExecutionFailedException: Listener threw exception的问题

rabbitmq 监听的队列名称写错导致找不到队列

这时就需要查看自己配置配置文件是否正确

spring.cloud.stream.bindings.obcp-params-input-channel-fund.binder=defaultBinder
spring.cloud.stream.bindings.obcp-params-input-channel-fund.destination=obcp-params-exchange-fund
spring.cloud.stream.bindings.obcp-params-input-channel-fund.content-type=application/json
spring.cloud.stream.bindings.obcp-params-input-channel-fund.group=obcp-params-group-fund
spring.cloud.stream.bindings.obcp-params-input-channel-fund.consumer.max-attempts=3
spring.cloud.stream.bindings.obcp-params-input-channel-fund.consumer.back-off-initial-interval=1000
spring.cloud.stream.bindings.obcp-params-input-channel-fund.consumer.back-off-multiplier=2
spring.cloud.stream.bindings.obcp-params-input-channel-fund.consumer.back-off-max-interval=10000

 这是我的这个配置

   于是到控制台查看

 发现相对于控制台多了个s,将这个配置文件的s去掉重新启动即可生效。如果不生效,就clean再编译一下看看,或者清除缓存 将队列删除再创建队列试试看。

 

posted @ 2024-06-25 09:40  TIME_小白  阅读(200)  评论(0)    收藏  举报