Package net.jodah.lyra.config
Interface ChannelConfig
- All Superinterfaces:
ConsumerConfig
- All Known Subinterfaces:
ConfigurableChannel
,ConfigurableConnection
,ConnectionConfig
- All Known Implementing Classes:
Config
public interface ChannelConfig extends ConsumerConfig
Channel
related configuration.-
Method Summary
Modifier and Type Method Description java.util.Collection<ChannelListener>
getChannelListeners()
Returns the channel's listeners else empty list if none were configured.RecoveryPolicy
getChannelRecoveryPolicy()
Returns the channel's recovery policy.RetryPolicy
getChannelRetryPolicy()
Returns the channel's retry policy.boolean
isExchangeRecoveryEnabled()
Returns whether exchange and exchange binding recovery is enabled.boolean
isQueueRecoveryEnabled()
Returns whether queue and queue binding recovery is enabled.ChannelConfig
withChannelListeners(ChannelListener... channelListeners)
Sets thechannelListeners
to call on channel related events.ChannelConfig
withChannelRecoveryPolicy(RecoveryPolicy recoveryPolicy)
Sets therecoveryPolicy
to use for recovering the channel.ChannelConfig
withChannelRetryPolicy(RetryPolicy retryPolicy)
Sets theretryPolicy
to use for retrying failed invocations on the channel.ConsumerConfig
withExchangeRecovery(boolean enabled)
Sets whether exchange and exchange binding recovery is enabled or not.ConsumerConfig
withQueueRecovery(boolean enabled)
Sets whether queue and queue binding recovery is enabled or not.Methods inherited from interface net.jodah.lyra.config.ConsumerConfig
getConsumerListeners, isConsumerRecoveryEnabled, withConsumerListeners, withConsumerRecovery
-
Method Details
-
getChannelListeners
java.util.Collection<ChannelListener> getChannelListeners()Returns the channel's listeners else empty list if none were configured.- See Also:
withChannelListeners(ChannelListener...)
-
getChannelRecoveryPolicy
RecoveryPolicy getChannelRecoveryPolicy()Returns the channel's recovery policy. -
getChannelRetryPolicy
RetryPolicy getChannelRetryPolicy()Returns the channel's retry policy.- See Also:
withChannelRetryPolicy(RetryPolicy)
-
isExchangeRecoveryEnabled
boolean isExchangeRecoveryEnabled()Returns whether exchange and exchange binding recovery is enabled. Any non-durable or auto-deleting exchanges will be recovered unless they are explicitly deleted viaChannel.exchangeDelete(String)
.Defaults to true when channel recovery is configured.
- See Also:
withExchangeRecovery(boolean)
-
isQueueRecoveryEnabled
boolean isQueueRecoveryEnabled()Returns whether queue and queue binding recovery is enabled. Any non-durable or auto-deleting queues will be recovered unless they are explicitly deleted viaChannel.queueDelete(String)
.Defaults to true when channel recovery is configured.
- See Also:
withQueueRecovery(boolean)
-
withChannelListeners
Sets thechannelListeners
to call on channel related events. -
withChannelRecoveryPolicy
Sets therecoveryPolicy
to use for recovering the channel. -
withChannelRetryPolicy
Sets theretryPolicy
to use for retrying failed invocations on the channel. -
withExchangeRecovery
Sets whether exchange and exchange binding recovery is enabled or not. Any non-durable or auto-deleting exchanges will be recovered unless they are explicitly deleted viaChannel.exchangeDelete(String)
. -
withQueueRecovery
Sets whether queue and queue binding recovery is enabled or not. Any non-durable or auto-deleting queues will be recovered unless they are explicitly deleted viaChannel.queueDelete(String)
.
-