-
How can I distinguish which leaf node is sending this message in the core cluster in Java. My architecture is a central cluster with multiple leaf clusters. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
When you connect to a server with the java client, you get an instance of a You could use this id or name as either part of your message payload, or as message header. |
Beta Was this translation helpful? Give feedback.
When you connect to a server with the java client, you get an instance of a
Connection
object. TheConnection
object has a method calledgetServerInfo()
.ServerInfo
has an id you can read withgetServerId()
. This id is always set by the server itself. There is also a name you can read withgetServerName()
. The name you can set yourself in the server conf with theserver_name
propertyYou could use this id or name as either part of your message payload, or as message header.