Question

We have a HornetQ running in standalone mode. Is it possible to get current connection's state (for example, is it online, offline, connecting) in runtime using JMS API?

For example, Progress SonicMQ has 'getConnectionState' method (http://documentation.progress.com/output/Sonic/8.0.0/Docs8.0/api/sonicmq_api/progress/message/jclient/Connection.html#getConnectionState())

Does something similar exist in HornetQ?

Était-ce utile?

La solution

There is no any kind of state like this on HornetQ JMS connection implementation. They implement the JMS ExceptionListener (and a corresponding FailureListener on the "core" API) which will be called in the event of a failure or a fail-over event, but doesn't provide fine-grained callbacks for connection state transitions.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top