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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top