问答详情
源自:3-5 RabbitMQ整合SpringBoot2-消息可靠性投递-实现方案落地代码详解-4

投递任务执行第一次后就彻底停止了……求老师解答!

故意把交换机名称写错,以利用定时任务多次投递,可是投递第一次失败后整个程序就停止了……

日志如下:

2019-04-28 14:37:25.840 ERROR 17428 --- [168.53.187:5672] o.s.a.r.c.CachingConnectionFactory       : Channel shutdown: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no exchange 'Order-Exchang' in vhost '/', class-id=60, method-id=40)

2019-04-28 14:37:25.853  INFO 17428 --- [       Thread-2] o.s.w.c.s.GenericWebApplicationContext   : Closing org.springframework.web.context.support.GenericWebApplicationContext@6e9175d8: startup date [Sun Apr 28 14:37:14 CST 2019]; root of context hierarchy

2019-04-28 14:37:25.857  INFO 17428 --- [       Thread-2] o.s.c.support.DefaultLifecycleProcessor  : Stopping beans in phase 2147483647

2019-04-28 14:37:25.858  INFO 17428 --- [       Thread-2] o.s.c.support.DefaultLifecycleProcessor  : Stopping beans in phase 0


提问者:幕布斯1005 2019-04-28 14:43

个回答

  • 码工1023
    2020-06-26 00:01:38

    同问,运行一次就停止了,也加了spring-boot-starter-web依赖

  • BoxboxMan
    2019-05-15 11:54:25

    是不是没有加pom依赖项目直接停止了,spring-boot-starter-web