Configure RabbitMQ to replace an old pending message with a new one

让人想犯罪 __ 提交于 2019-12-06 05:19:13
robthewolf

You need to install Last Value Cache and enable it. Your exchange will be type "x-lvc", which inherits from the direct exchange type.

each time you connect to MQ, create a queue and bind to this exchange. It will deliver the most recent message to the queue. It is perfect for making sure you get only the most uptodate message. All other messages sent to this exchange are discarded unless there is a queue connected. So once connected you will continue to receive updates.

here are installation instructions: https://github.com/simonmacmullen/rabbitmq-lvc-plugin

here is a similar question: RabbitMQ messaging - initializing consumer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!