Class RecoveryAwareChannelN
java.lang.Object
com.rabbitmq.client.impl.ShutdownNotifierComponent
com.rabbitmq.client.impl.AMQChannel
com.rabbitmq.client.impl.ChannelN
com.rabbitmq.client.impl.recovery.RecoveryAwareChannelN
- All Implemented Interfaces:
Channel, ShutdownNotifier, AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from class AMQChannel
AMQChannel.BlockingRpcContinuation<T>, AMQChannel.RpcContinuation, AMQChannel.SimpleBlockingRpcContinuation -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longprivate longFields inherited from class ChannelN
metricsCollectorFields inherited from class AMQChannel
_blockContent, _channelLock, _channelLockCondition, _rpcTimeout, NO_RPC_TIMEOUT -
Constructor Summary
ConstructorsConstructorDescriptionRecoveryAwareChannelN(AMQConnection connection, int channelNumber, ConsumerWorkService workService) Construct a new channel on the given connection with the given channel number.RecoveryAwareChannelN(AMQConnection connection, int channelNumber, ConsumerWorkService workService, MetricsCollector metricsCollector, ObservationCollector observationCollector) Construct a new channel on the given connection with the given channel number. -
Method Summary
Modifier and TypeMethodDescriptionvoidbasicAck(long deliveryTag, boolean multiple) Public API - Public API - Acknowledge one or several received messages.voidbasicNack(long deliveryTag, boolean multiple, boolean requeue) Public API - Public API - Reject one or several received messages.voidbasicReject(long deliveryTag, boolean requeue) Public API - Public API - Reject a message.longlong(package private) voidprivate AMQImpl.Basic.Deliverprotected voidprocessDelivery(Command command, AMQImpl.Basic.Deliver method) Methods inherited from class ChannelN
abort, abort, addConfirmListener, addConfirmListener, addReturnListener, addReturnListener, asyncCompletableRpc, asyncRpc, basicCancel, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicConsume, basicGet, basicPublish, basicPublish, basicPublish, basicQos, basicQos, basicQos, basicRecover, basicRecover, clearConfirmListeners, clearReturnListeners, close, close, close, confirmSelect, consumerCount, enqueueRpc, exchangeBind, exchangeBind, exchangeBindNoWait, exchangeDeclare, exchangeDeclare, exchangeDeclare, exchangeDeclare, exchangeDeclare, exchangeDeclare, exchangeDeclare, exchangeDeclare, exchangeDeclareNoWait, exchangeDeclareNoWait, exchangeDeclarePassive, exchangeDelete, exchangeDelete, exchangeDeleteNoWait, exchangeUnbind, exchangeUnbind, exchangeUnbindNoWait, getDefaultConsumer, getNextPublishSeqNo, markRpcFinished, messageCount, open, processAsync, processShutdownSignal, queueBind, queueBind, queueBindNoWait, queueDeclare, queueDeclare, queueDeclareNoWait, queueDeclarePassive, queueDelete, queueDelete, queueDeleteNoWait, queuePurge, queueUnbind, queueUnbind, removeConfirmListener, removeReturnListener, rpc, setDefaultConsumer, txCommit, txRollback, txSelect, waitForConfirms, waitForConfirms, waitForConfirmsOrDie, waitForConfirmsOrDieMethods inherited from class AMQChannel
asyncRpc, connectionInfo, enqueueAsyncRpc, ensureIsOpen, exnWrappingAsyncRpc, exnWrappingRpc, getChannelNumber, getConnection, handleCompleteInboundCommand, handleFrame, isOutstandingRpc, nextOutstandingRpc, notifyOutstandingRpc, quiescingAsyncRpc, quiescingRpc, quiescingTransmit, quiescingTransmit, rpc, rpc, toString, transmit, transmit, wrap, wrap, wrapTimeoutExceptionMethods inherited from class ShutdownNotifierComponent
addShutdownListener, getCloseReason, isOpen, notifyListeners, removeShutdownListener, setShutdownCauseIfOpenMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Channel
getChannelNumber, getConnectionMethods inherited from interface ShutdownNotifier
addShutdownListener, getCloseReason, isOpen, notifyListeners, removeShutdownListener
-
Field Details
-
maxSeenDeliveryTag
private volatile long maxSeenDeliveryTag -
activeDeliveryTagOffset
private volatile long activeDeliveryTagOffset
-
-
Constructor Details
-
RecoveryAwareChannelN
public RecoveryAwareChannelN(AMQConnection connection, int channelNumber, ConsumerWorkService workService) Construct a new channel on the given connection with the given channel number. Usually not called directly - call Connection.createChannel instead.- Parameters:
connection- The connection associated with this channelchannelNumber- The channel number to be associated with this channelworkService- service for managing this channel's consumer callbacks
-
RecoveryAwareChannelN
public RecoveryAwareChannelN(AMQConnection connection, int channelNumber, ConsumerWorkService workService, MetricsCollector metricsCollector, ObservationCollector observationCollector) Construct a new channel on the given connection with the given channel number. Usually not called directly - call Connection.createChannel instead.- Parameters:
connection- The connection associated with this channelchannelNumber- The channel number to be associated with this channelworkService- service for managing this channel's consumer callbacksmetricsCollector- service for managing metrics
-
-
Method Details
-
processDelivery
- Overrides:
processDeliveryin classChannelN
-
offsetDeliveryTag
-
basicAck
Description copied from class:ChannelNPublic API - Acknowledge one or several received messages. Supply the deliveryTag from theAMQP.Basic.GetOkorAMQP.Basic.Delivermethod containing the received message being acknowledged.- Specified by:
basicAckin interfaceChannel- Overrides:
basicAckin classChannelN- Parameters:
deliveryTag- the tag from the receivedAMQP.Basic.GetOkorAMQP.Basic.Delivermultiple- true to acknowledge all messages up to and including the supplied delivery tag; false to acknowledge just the supplied delivery tag.- Throws:
IOException- if an error is encountered- See Also:
-
basicNack
Description copied from class:ChannelNPublic API - Reject one or several received messages. Supply thedeliveryTagfrom theAMQP.Basic.GetOkorAMQP.Basic.Delivermethod containing the message to be rejected.- Specified by:
basicNackin interfaceChannel- Overrides:
basicNackin classChannelN- Parameters:
deliveryTag- the tag from the receivedAMQP.Basic.GetOkorAMQP.Basic.Delivermultiple- true to reject all messages up to and including the supplied delivery tag; false to reject just the supplied delivery tag.requeue- true if the rejected message(s) should be requeued rather than discarded/dead-lettered- Throws:
IOException- if an error is encountered- See Also:
-
basicReject
Description copied from class:ChannelNPublic API - Reject a message. Supply the deliveryTag from theAMQP.Basic.GetOkorAMQP.Basic.Delivermethod containing the received message being rejected.- Specified by:
basicRejectin interfaceChannel- Overrides:
basicRejectin classChannelN- Parameters:
deliveryTag- the tag from the receivedAMQP.Basic.GetOkorAMQP.Basic.Deliverrequeue- true if the rejected message should be requeued rather than discarded/dead-lettered- Throws:
IOException- if an error is encountered- See Also:
-
inheritOffsetFrom
-
getMaxSeenDeliveryTag
public long getMaxSeenDeliveryTag() -
getActiveDeliveryTagOffset
public long getActiveDeliveryTagOffset()
-