Skip to content

How can i get message publisher? #970

Closed Answered by scottf
Alexety asked this question in Q&A
Discussion options

You must be logged in to vote

When you connect to a server with the java client, you get an instance of a Connection object. The Connection object has a method called getServerInfo(). ServerInfo has an id you can read with getServerId(). This id is always set by the server itself. There is also a name you can read with getServerName(). The name you can set yourself in the server conf with the server_name property

You could use this id or name as either part of your message payload, or as message header.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Alexety
Comment options

Answer selected by scottf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants