public class RecoveryAwareChannelN extends ChannelN
ChannelN
modification that keeps track of delivery
tags and avoids sending basic.ack,
basic.nack, and
basic.rejectfor stale tags.
AMQChannel.BlockingRpcContinuation<T>, AMQChannel.RpcContinuation, AMQChannel.SimpleBlockingRpcContinuation
metricsCollector
_blockContent, _channelMutex, _rpcTimeout, NO_RPC_TIMEOUT
Constructor and Description |
---|
RecoveryAwareChannelN(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)
Construct a new channel on the given connection with the given
channel number.
|
Modifier and Type | Method and Description |
---|---|
void |
basicAck(long deliveryTag,
boolean multiple)
Public API - Acknowledge one or several received
messages.
|
void |
basicNack(long deliveryTag,
boolean multiple,
boolean requeue)
Public API - Reject one or several received messages.
|
void |
basicReject(long deliveryTag,
boolean requeue)
Public API - Reject a message.
|
long |
getActiveDeliveryTagOffset() |
long |
getMaxSeenDeliveryTag() |
protected void |
processDelivery(Command command,
AMQImpl.Basic.Deliver method) |
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, waitForConfirmsOrDie
asyncRpc, enqueueAsyncRpc, ensureIsOpen, exnWrappingAsyncRpc, exnWrappingRpc, getChannelNumber, getConnection, handleCompleteInboundCommand, handleFrame, isOutstandingRpc, nextOutstandingRpc, notifyOutstandingRpc, quiescingAsyncRpc, quiescingRpc, quiescingTransmit, quiescingTransmit, rpc, rpc, toString, transmit, transmit, wrap, wrap, wrapTimeoutException
addShutdownListener, getCloseReason, isOpen, notifyListeners, removeShutdownListener, setShutdownCauseIfOpen
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChannelNumber, getConnection
addShutdownListener, getCloseReason, isOpen, notifyListeners, removeShutdownListener
public RecoveryAwareChannelN(AMQConnection connection, int channelNumber, ConsumerWorkService workService)
connection
- The connection associated with this channelchannelNumber
- The channel number to be associated with this channelworkService
- service for managing this channel's consumer callbackspublic RecoveryAwareChannelN(AMQConnection connection, int channelNumber, ConsumerWorkService workService, MetricsCollector metricsCollector)
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 metricsprotected void processDelivery(Command command, AMQImpl.Basic.Deliver method)
processDelivery
in class ChannelN
public void basicAck(long deliveryTag, boolean multiple) throws IOException
ChannelN
AMQP.Basic.GetOk
or AMQP.Basic.Deliver
method
containing the received message being acknowledged.basicAck
in interface Channel
basicAck
in class ChannelN
deliveryTag
- the tag from the received AMQP.Basic.GetOk
or AMQP.Basic.Deliver
multiple
- true to acknowledge all messages up to and
including the supplied delivery tag; false to acknowledge just
the supplied delivery tag.IOException
- if an error is encounteredAMQP.Basic.Ack
public void basicNack(long deliveryTag, boolean multiple, boolean requeue) throws IOException
ChannelN
deliveryTag
from the AMQP.Basic.GetOk
or AMQP.Basic.GetOk
method containing the message to be rejected.basicNack
in interface Channel
basicNack
in class ChannelN
deliveryTag
- the tag from the received AMQP.Basic.GetOk
or AMQP.Basic.Deliver
multiple
- 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-letteredIOException
- if an error is encounteredAMQP.Basic.Nack
public void basicReject(long deliveryTag, boolean requeue) throws IOException
ChannelN
AMQP.Basic.GetOk
or AMQP.Basic.Deliver
method
containing the received message being rejected.basicReject
in interface Channel
basicReject
in class ChannelN
deliveryTag
- the tag from the received AMQP.Basic.GetOk
or AMQP.Basic.Deliver
requeue
- true if the rejected message should be requeued rather than discarded/dead-letteredIOException
- if an error is encounteredAMQP.Basic.Reject
public long getMaxSeenDeliveryTag()
public long getActiveDeliveryTagOffset()
Copyright © 2022 VMware, Inc. or its affiliates.. All rights reserved.