码迷,mamicode.com
首页 > 其他好文 > 详细

rabbitmq-设置队列全局过期时间后不能发送消息

时间:2020-01-07 18:27:56      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:注释   技术   dcom   except   error   重启   syn   java   type   

最开始创建队列能正常发送消息,是这样的:

技术图片

 

 能正常发送,当把上面的注释放开后,则不能发送消息,报如下错误:

com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg ‘x-message-ttl‘ for queue ‘top.name3‘ in vhost ‘/‘: received the value ‘10000‘ of type ‘long‘ but current is none, class-id=50, method-id=10)
	at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:516) ~[amqp-client-5.4.3.jar:5.4.3]
	at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:346) ~[amqp-client-5.4.3.jar:5.4.3]
	at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:178) ~[amqp-client-5.4.3.jar:5.4.3]
	at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:111) ~[amqp-client-5.4.3.jar:5.4.3]
	at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:670) ~[amqp-client-5.4.3.jar:5.4.3]
	at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:48) ~[amqp-client-5.4.3.jar:5.4.3]
	at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:597) ~[amqp-client-5.4.3.jar:5.4.3]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_92]

 

解决:

进入mq控制台删除该队列,重启应用程序

rabbitmq-设置队列全局过期时间后不能发送消息

标签:注释   技术   dcom   except   error   重启   syn   java   type   

原文地址:https://www.cnblogs.com/longyao/p/12162880.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!