ActiveMQ C# +经纪人网络

发布于 2024-08-06 03:05:47 字数 246 浏览 6 评论 0原文

我正在 C# 中使用 ActiveMQ 设置通知服务。 我的 ActiveMQ 拓扑是一个代理网络:我有一个代理池,我的客户端使用故障转移 uri 随机连接到其中任何一个。 我的问题很简单,但我找不到答案: 我想调试消息最初发送到哪个代理。当然,我可以检索用于创建我的 connectionFactory 的 uri,但这并没有真正的帮助。 关于如何捕获消息发送到代理网络中的哪个特定代理的任何想法?

非常感谢你,

塞布

I'm setting up a notification service using ActiveMQ, in C#.
My ActiveMQ topology is a network of brokers: I've a pool of brokers and my clients use the failover uri to randomly connect to any of them.
My question is rather simple but I was not able to find the answer:
I want to debug to which broker the messages are originally sent to. Of course i can retrieve the uri used to create my connectionFactory, but this doesn't really help.
Any idea on how to catch to which specific broker of the network of brokers the message is sent to?

Thank you very much,

Seb

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

给不了的爱 2024-08-13 03:05:47

已接收消息的代理 ID 应位于 ActiveMQMessage 本身中。我不知道 NMS 的属性,但您应该看一下底层消息:

(myMessage as ActiveMQMessage)。BrokerPath 可能是您最好的选择。

The broker id that has received the message should be in the ActiveMQMessage itself. I don't know the property by heart for NMS but you should take a look at the underlying message:

(myMessage as ActiveMQMessage).BrokerPath might be your best bet.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文