public interface ConnectAttemptListener
AbstractConnectionFactory
in order to notify messaging application about every successful and unsuccessful connectivity attempt.
The connectAttemptFailed(URI, JMSException) can be used as a trigger to rotate expired credentials, if those
are set via extension mechanism AbstractConnectionFactory.setExtension(String, BiFunction).| Modifier and Type | Method and Description |
|---|---|
boolean |
connectAttemptFailed(URI brokerURI,
javax.jms.JMSException e)
Invoked when connect attempt to the given broker URI failed with a given exception.
|
void |
connectAttemptSucceeded(URI brokerURI)
Invoked when connection is established successfully to the broker with a given URI
|
boolean connectAttemptFailed(URI brokerURI, javax.jms.JMSException e)
AbstractConnectionFactory.setExtension(String, BiFunction).
The method can return true, if connection attempt needs to be repeated to the same broker immediately
and without incrementing a failover re-try counter.
Otherwise, the connection would be attempted as per failover settings.brokerURI - target broker URIe - exception thrown on connect attemptvoid connectAttemptSucceeded(URI brokerURI)
brokerURI - target broker URICopyright © 2006–2020 The Apache Software Foundation. All rights reserved.