通知ActiveMQ生产者,如果目的地的消费者掉线了 [英] Notify ActiveMQ producer if consumer on the destination is down

查看:134
本文介绍了通知ActiveMQ生产者,如果目的地的消费者掉线了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ActiveMQ消息传递代理,并且我有一个要求,生产者应用程序想知道在特定目标上使用的消费者应用程序是否启动?

I am using ActiveMQ messaging broker and I have a requirement where the producer application would want to know if the consumer application consuming on the particular destination is up or not?

我该如何实现?

谢谢!

推荐答案

您应该结帐咨询消息.如果您想更新此类事件,可以订阅该主题.

You should checkout Advisory messages. It's a topic you can subscribe to if you want updates on such events.

特别是主题:ActiveMQ.Advisory.NoConsumer.Queue应该引起人们的兴趣.您需要通过使用目标策略属性sendAdvisoryIfNoConsumers来启用它的代理端.

Specifically the topic: ActiveMQ.Advisory.NoConsumer.Queue should be of interest. You need to enable it broker side though using the destination policy property: sendAdvisoryIfNoConsumers.

这篇关于通知ActiveMQ生产者,如果目的地的消费者掉线了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆