简体   繁体   English

WSO2 MB-如何获取发布者IP或ID

[英]WSO2 MB - How to Get Publisher IP or ID

in a use case in which i have N publishers on a topic and M subscribers to the same topic, when a message is delivered, is there the native possibility for a each subscriber to know which was the actual publisher (by an ID or an IP field)? 在一个我有一个主题的N个发布者和一个主题的M个订阅者的用例中,当传递消息时,每个订阅者都有本机的可能性来知道哪个是实际的发布者(通过ID或IP)领域)? Is this information stored into the header of the message (ie setting the JMSReplyTo header)? 此信息是否存储在消息的标题中(即设置JMSReplyTo标题)? or have i to set it manually adding some custom property? 还是让我手动设置它以添加一些自定义属性? thanks a lot 非常感谢

Use a custom jms header like textMessage.setStringProperty("ip", "127.0.0.1"); 使用自定义的jms标头,例如textMessage.setStringProperty(“ ip”,“ 127.0.0.1”));

read it using message.getStringProperty("ip"); 使用message.getStringProperty(“ ip”);阅读

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM