Package net.jodah.lyra.event
Interface ChannelListener
- All Known Implementing Classes:
DefaultChannelListener
public interface ChannelListener
Listens for
Channel
related events.-
Method Summary
Modifier and Type Method Description void
onCreate(com.rabbitmq.client.Channel channel)
Called when thechannel
is successfully created.void
onCreateFailure(java.lang.Throwable failure)
Called when channel creation fails.void
onRecovery(com.rabbitmq.client.Channel channel)
Called when thechannel
is successfully recovered from an unexpected closure but before its consumers and their associated queues, exchanges, and bindings are recovered.void
onRecoveryCompleted(com.rabbitmq.client.Channel channel)
Called when recovery of thechannel
and its consumers is completed.void
onRecoveryFailure(com.rabbitmq.client.Channel channel, java.lang.Throwable failure)
Called when thechannel
fails to recover from an unexpected closure.void
onRecoveryStarted(com.rabbitmq.client.Channel channel)
Called when recovery of thechannel
is started.
-
Method Details
-
onCreate
void onCreate(com.rabbitmq.client.Channel channel)Called when thechannel
is successfully created. -
onCreateFailure
void onCreateFailure(java.lang.Throwable failure)Called when channel creation fails. -
onRecoveryStarted
void onRecoveryStarted(com.rabbitmq.client.Channel channel)Called when recovery of thechannel
is started. -
onRecovery
void onRecovery(com.rabbitmq.client.Channel channel)Called when thechannel
is successfully recovered from an unexpected closure but before its consumers and their associated queues, exchanges, and bindings are recovered. This is useful for performing any pre-consumer setup that is required such as declaring exchanges and queues, and creating queue to exchange bindings. -
onRecoveryCompleted
void onRecoveryCompleted(com.rabbitmq.client.Channel channel)Called when recovery of thechannel
and its consumers is completed. Note: The success or failure of an individual consumer's recovery can be tracked with aConsumerListener
. -
onRecoveryFailure
void onRecoveryFailure(com.rabbitmq.client.Channel channel, java.lang.Throwable failure)Called when thechannel
fails to recover from an unexpected closure.
-