Вопрос

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