I've recently switched to HornetQ 2.2.14. I have a very simple, yet frustrating question that I have yet to to find the answer to (I fear that I'm missing something incredibly obvious).
Let's say that I have a three-node HornetQ cluster:
- Node A is running on machine "serverA", Node B on "serverB", and Node C on "serverC"
- Client connections are handled via a Discovery group
The client connects using the discovery address, and ultimately gets connected to to *one* of the nodes.
Is there any way to easilly tell *which* particular node it connects to (e.g. "serverA", "serverB", or "serverC" [or their respective IP addresses])?
you can only really do it via the core API, something like
HornetQSession hornetQSession = (HornetQSession) jmsSession;
ClientSessionInternal sessionInternal = (ClientSessionInternal) hornetQSession.getCoreSession();
TransportConfiguration tc = sessionInternal.getSessionFactory().getConnectorConfiguration();
however, bear in mind that this is an internal API and subject to change.