Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'testRabbit4' in vhost
由于rabbitmq 消费者 监听消息队列时, 消息队列没有创建 导致上面的异常
解决: 添加如下配置信息
@Configuration
public class RabbitConfig {
@Bean
Queuequeue3() {
return new Queue("testRabbit4", false);
}
}