在通过channel.queueBind设置别名的时候,就出现了Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'qu.liu' in vhost '/', class-id=50, method-id=20)这一长串报错。
通过源码发现,是String类型没错。
仔细看报错
qu.liu 没找到,404,就是说没有这个队列
仔细一看,原来是没有先创建队列
先声明名称
创建队列
记录错误