标签:rri sage bsp service 安装位置 bit ble pex png
声明交换机为延迟时报异常( unknown exchange type ‘x-delayed-message‘)的解决方法
服务端需下载安装插件:
rpm -ql rabbitmq-server查询安装位置
将下载的ez结尾的文件移至/plugins/目录下
[root@localhost plugins]# rabbitmq-plugins enable rabbitmq_delayed_message_exchange
[root@localhost plugins]# systemctl restart rabbitmq-server.service
rabbitTemplate.convertAndSend("test_publish_exchange",routingKey,content,new MessagePostProcessor() { @Override public Message postProcessMessage(Message message) throws AmqpException { //设置消息持久化 //message.getMessageProperties().setDeliveryMode(MessageDeliveryMode.PERSISTENT); //message.getMessageProperties().setHeader("x-delay", "6000"); message.getMessageProperties().setDelay(6000); return message; } });
标签:rri sage bsp service 安装位置 bit ble pex png
原文地址:https://www.cnblogs.com/lantuanqing/p/11289107.html