Class PublisherCallbackChannelImpl
- java.lang.Object
-
- org.springframework.amqp.rabbit.connection.PublisherCallbackChannelImpl
-
- All Implemented Interfaces:
com.rabbitmq.client.Channel,com.rabbitmq.client.ConfirmListener,com.rabbitmq.client.ReturnCallback,com.rabbitmq.client.ShutdownListener,com.rabbitmq.client.ShutdownNotifier,AutoCloseable,EventListener,PublisherCallbackChannel
public class PublisherCallbackChannelImpl extends Object implements PublisherCallbackChannel, com.rabbitmq.client.ConfirmListener, com.rabbitmq.client.ReturnCallback, com.rabbitmq.client.ShutdownListener
Channel wrapper to allow a single listener able to handle confirms from multiple channels.- Since:
- 1.0.1
- Author:
- Gary Russell, Arnaud Cogoluègnes, Artem Bilan
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.springframework.amqp.rabbit.connection.PublisherCallbackChannel
PublisherCallbackChannel.Listener
-
-
Field Summary
-
Fields inherited from interface org.springframework.amqp.rabbit.connection.PublisherCallbackChannel
RETURN_LISTENER_CORRELATION_KEY, RETURNED_MESSAGE_CORRELATION_KEY
-
-
Constructor Summary
Constructors Constructor Description PublisherCallbackChannelImpl(com.rabbitmq.client.Channel delegate, ExecutorService executor)Create aPublisherCallbackChannelImplinstance based on the provided delegate and executor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()voidabort(int closeCode, String closeMessage)com.rabbitmq.client.ConfirmListeneraddConfirmListener(com.rabbitmq.client.ConfirmCallback ackCallback, com.rabbitmq.client.ConfirmCallback nackCallback)voidaddConfirmListener(com.rabbitmq.client.ConfirmListener listener)voidaddListener(PublisherCallbackChannel.Listener listener)Add the listener and return the internal map of pending confirmations for that listener.voidaddPendingConfirm(PublisherCallbackChannel.Listener listener, long seq, PendingConfirm pendingConfirm)Adds a pending confirmation to this channel's map.com.rabbitmq.client.ReturnListeneraddReturnListener(com.rabbitmq.client.ReturnCallback returnCallback)Added to the 5.0.x client.voidaddReturnListener(com.rabbitmq.client.ReturnListener listener)voidaddShutdownListener(com.rabbitmq.client.ShutdownListener listener)CompletableFuture<com.rabbitmq.client.Command>asyncCompletableRpc(com.rabbitmq.client.Method method)Added to the 5.0.x client.voidasyncRpc(com.rabbitmq.client.Method method)voidbasicAck(long deliveryTag, boolean multiple)voidbasicCancel(String consumerTag)StringbasicConsume(String queue, boolean autoAck, com.rabbitmq.client.Consumer callback)StringbasicConsume(String queue, boolean autoAck, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback)Added to the 5.0.x client.StringbasicConsume(String queue, boolean autoAck, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback)Added to the 5.0.x client.StringbasicConsume(String queue, boolean autoAck, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback)Added to the 5.0.x client.StringbasicConsume(String queue, boolean autoAck, String consumerTag, boolean noLocal, boolean exclusive, Map<String,Object> arguments, com.rabbitmq.client.Consumer callback)StringbasicConsume(String queue, boolean autoAck, String consumerTag, boolean noLocal, boolean exclusive, Map<String,Object> arguments, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback)Added to the 5.0.x client.StringbasicConsume(String queue, boolean autoAck, String consumerTag, boolean noLocal, boolean exclusive, Map<String,Object> arguments, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback)Added to the 5.0.x client.StringbasicConsume(String queue, boolean autoAck, String consumerTag, boolean noLocal, boolean exclusive, Map<String,Object> arguments, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback)Added to the 5.0.x client.StringbasicConsume(String queue, boolean autoAck, String consumerTag, com.rabbitmq.client.Consumer callback)StringbasicConsume(String queue, boolean autoAck, String consumerTag, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback)Added to the 5.0.x client.StringbasicConsume(String queue, boolean autoAck, String consumerTag, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback)Added to the 5.0.x client.StringbasicConsume(String queue, boolean autoAck, String consumerTag, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback)Added to the 5.0.x client.StringbasicConsume(String queue, boolean autoAck, Map<String,Object> arguments, com.rabbitmq.client.Consumer callback)Added to the 3.3.x client.StringbasicConsume(String queue, boolean autoAck, Map<String,Object> arguments, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback)Added to the 5.0.x client.StringbasicConsume(String queue, boolean autoAck, Map<String,Object> arguments, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback)Added to the 5.0.x client.StringbasicConsume(String queue, boolean autoAck, Map<String,Object> arguments, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback)Added to the 5.0.x client.StringbasicConsume(String queue, com.rabbitmq.client.Consumer callback)StringbasicConsume(String queue, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback)Added to the 5.0.x client.StringbasicConsume(String queue, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback)Added to the 5.0.x client.StringbasicConsume(String queue, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback)Added to the 5.0.x client.com.rabbitmq.client.GetResponsebasicGet(String queue, boolean autoAck)voidbasicNack(long deliveryTag, boolean multiple, boolean requeue)voidbasicPublish(String exchange, String routingKey, boolean mandatory, boolean immediate, com.rabbitmq.client.AMQP.BasicProperties props, byte[] body)voidbasicPublish(String exchange, String routingKey, boolean mandatory, com.rabbitmq.client.AMQP.BasicProperties props, byte[] body)voidbasicPublish(String exchange, String routingKey, com.rabbitmq.client.AMQP.BasicProperties props, byte[] body)voidbasicQos(int prefetchCount)voidbasicQos(int prefetchCount, boolean global)Added to the 3.3.x client.voidbasicQos(int prefetchSize, int prefetchCount, boolean global)com.rabbitmq.client.AMQP.Basic.RecoverOkbasicRecover()com.rabbitmq.client.AMQP.Basic.RecoverOkbasicRecover(boolean requeue)voidbasicReject(long deliveryTag, boolean requeue)voidclearConfirmListeners()voidclearReturnListeners()voidclose()voidclose(int closeCode, String closeMessage)com.rabbitmq.client.AMQP.Confirm.SelectOkconfirmSelect()longconsumerCount(String queue)booleanequals(Object obj)com.rabbitmq.client.AMQP.Exchange.BindOkexchangeBind(String destination, String source, String routingKey)com.rabbitmq.client.AMQP.Exchange.BindOkexchangeBind(String destination, String source, String routingKey, Map<String,Object> arguments)voidexchangeBindNoWait(String destination, String source, String routingKey, Map<String,Object> arguments)com.rabbitmq.client.AMQP.Exchange.DeclareOkexchangeDeclare(String exchange, com.rabbitmq.client.BuiltinExchangeType type)com.rabbitmq.client.AMQP.Exchange.DeclareOkexchangeDeclare(String exchange, com.rabbitmq.client.BuiltinExchangeType type, boolean durable)com.rabbitmq.client.AMQP.Exchange.DeclareOkexchangeDeclare(String exchange, com.rabbitmq.client.BuiltinExchangeType type, boolean durable, boolean autoDelete, boolean internal, Map<String,Object> arguments)com.rabbitmq.client.AMQP.Exchange.DeclareOkexchangeDeclare(String exchange, com.rabbitmq.client.BuiltinExchangeType type, boolean durable, boolean autoDelete, Map<String,Object> arguments)com.rabbitmq.client.AMQP.Exchange.DeclareOkexchangeDeclare(String exchange, String type)com.rabbitmq.client.AMQP.Exchange.DeclareOkexchangeDeclare(String exchange, String type, boolean durable)com.rabbitmq.client.AMQP.Exchange.DeclareOkexchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, boolean internal, Map<String,Object> arguments)com.rabbitmq.client.AMQP.Exchange.DeclareOkexchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, Map<String,Object> arguments)voidexchangeDeclareNoWait(String exchange, com.rabbitmq.client.BuiltinExchangeType type, boolean durable, boolean autoDelete, boolean internal, Map<String,Object> arguments)voidexchangeDeclareNoWait(String exchange, String type, boolean durable, boolean autoDelete, boolean internal, Map<String,Object> arguments)com.rabbitmq.client.AMQP.Exchange.DeclareOkexchangeDeclarePassive(String name)com.rabbitmq.client.AMQP.Exchange.DeleteOkexchangeDelete(String exchange)com.rabbitmq.client.AMQP.Exchange.DeleteOkexchangeDelete(String exchange, boolean ifUnused)voidexchangeDeleteNoWait(String exchange, boolean ifUnused)com.rabbitmq.client.AMQP.Exchange.UnbindOkexchangeUnbind(String destination, String source, String routingKey)com.rabbitmq.client.AMQP.Exchange.UnbindOkexchangeUnbind(String destination, String source, String routingKey, Map<String,Object> arguments)voidexchangeUnbindNoWait(String destination, String source, String routingKey, Map<String,Object> arguments)Collection<PendingConfirm>expire(PublisherCallbackChannel.Listener listener, long cutoffTime)Expire (remove) anyPendingConfirms created before cutoffTime for the supplied listener and return them to the caller.static PublisherCallbackChannelFactoryfactory()intgetChannelNumber()com.rabbitmq.client.ShutdownSignalExceptiongetCloseReason()com.rabbitmq.client.ConnectiongetConnection()com.rabbitmq.client.ConsumergetDefaultConsumer()com.rabbitmq.client.ChannelgetDelegate()Use this to invoke methods on the underlying rabbit clientChannelthat are not supported by this implementation.longgetNextPublishSeqNo()intgetPendingConfirmsCount()Get the total pending confirms count.intgetPendingConfirmsCount(PublisherCallbackChannel.Listener listener)Get thePendingConfirms count.voidhandle(com.rabbitmq.client.Return returned)voidhandleAck(long seq, boolean multiple)voidhandleNack(long seq, boolean multiple)inthashCode()booleanisOpen()longmessageCount(String queue)voidnotifyListeners()com.rabbitmq.client.AMQP.Queue.BindOkqueueBind(String queue, String exchange, String routingKey)com.rabbitmq.client.AMQP.Queue.BindOkqueueBind(String queue, String exchange, String routingKey, Map<String,Object> arguments)voidqueueBindNoWait(String queue, String exchange, String routingKey, Map<String,Object> arguments)com.rabbitmq.client.AMQP.Queue.DeclareOkqueueDeclare()com.rabbitmq.client.AMQP.Queue.DeclareOkqueueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete, Map<String,Object> arguments)voidqueueDeclareNoWait(String queue, boolean durable, boolean exclusive, boolean autoDelete, Map<String,Object> arguments)com.rabbitmq.client.AMQP.Queue.DeclareOkqueueDeclarePassive(String queue)com.rabbitmq.client.AMQP.Queue.DeleteOkqueueDelete(String queue)com.rabbitmq.client.AMQP.Queue.DeleteOkqueueDelete(String queue, boolean ifUnused, boolean ifEmpty)voidqueueDeleteNoWait(String queue, boolean ifUnused, boolean ifEmpty)com.rabbitmq.client.AMQP.Queue.PurgeOkqueuePurge(String queue)com.rabbitmq.client.AMQP.Queue.UnbindOkqueueUnbind(String queue, String exchange, String routingKey)com.rabbitmq.client.AMQP.Queue.UnbindOkqueueUnbind(String queue, String exchange, String routingKey, Map<String,Object> arguments)booleanremoveConfirmListener(com.rabbitmq.client.ConfirmListener listener)booleanremoveReturnListener(com.rabbitmq.client.ReturnListener listener)voidremoveShutdownListener(com.rabbitmq.client.ShutdownListener listener)com.rabbitmq.client.Commandrpc(com.rabbitmq.client.Method method)voidsetAfterAckCallback(Consumer<com.rabbitmq.client.Channel> callback)Set a callback to be invoked after the ack/nack has been handled.voidsetDefaultConsumer(com.rabbitmq.client.Consumer consumer)voidshutdownCompleted(com.rabbitmq.client.ShutdownSignalException cause)StringtoString()com.rabbitmq.client.AMQP.Tx.CommitOktxCommit()com.rabbitmq.client.AMQP.Tx.RollbackOktxRollback()com.rabbitmq.client.AMQP.Tx.SelectOktxSelect()booleanwaitForConfirms()booleanwaitForConfirms(long timeout)voidwaitForConfirmsOrDie()voidwaitForConfirmsOrDie(long timeout)
-
-
-
Constructor Detail
-
PublisherCallbackChannelImpl
public PublisherCallbackChannelImpl(com.rabbitmq.client.Channel delegate, ExecutorService executor)Create aPublisherCallbackChannelImplinstance based on the provided delegate and executor.- Parameters:
delegate- the delegate channel.executor- the executor.
-
-
Method Detail
-
setAfterAckCallback
public void setAfterAckCallback(Consumer<com.rabbitmq.client.Channel> callback)
Description copied from interface:PublisherCallbackChannelSet a callback to be invoked after the ack/nack has been handled.- Specified by:
setAfterAckCallbackin interfacePublisherCallbackChannel- Parameters:
callback- the callback.
-
addShutdownListener
public void addShutdownListener(com.rabbitmq.client.ShutdownListener listener)
- Specified by:
addShutdownListenerin interfacecom.rabbitmq.client.ShutdownNotifier
-
removeShutdownListener
public void removeShutdownListener(com.rabbitmq.client.ShutdownListener listener)
- Specified by:
removeShutdownListenerin interfacecom.rabbitmq.client.ShutdownNotifier
-
getCloseReason
public com.rabbitmq.client.ShutdownSignalException getCloseReason()
- Specified by:
getCloseReasonin interfacecom.rabbitmq.client.ShutdownNotifier
-
notifyListeners
public void notifyListeners()
- Specified by:
notifyListenersin interfacecom.rabbitmq.client.ShutdownNotifier
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin interfacecom.rabbitmq.client.ShutdownNotifier
-
getChannelNumber
public int getChannelNumber()
- Specified by:
getChannelNumberin interfacecom.rabbitmq.client.Channel
-
getConnection
public com.rabbitmq.client.Connection getConnection()
- Specified by:
getConnectionin interfacecom.rabbitmq.client.Channel
-
close
public void close(int closeCode, String closeMessage) throws IOException, TimeoutException- Specified by:
closein interfacecom.rabbitmq.client.Channel- Throws:
IOExceptionTimeoutException
-
abort
public void abort() throws IOException- Specified by:
abortin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
abort
public void abort(int closeCode, String closeMessage) throws IOException- Specified by:
abortin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
getDefaultConsumer
public com.rabbitmq.client.Consumer getDefaultConsumer()
- Specified by:
getDefaultConsumerin interfacecom.rabbitmq.client.Channel
-
setDefaultConsumer
public void setDefaultConsumer(com.rabbitmq.client.Consumer consumer)
- Specified by:
setDefaultConsumerin interfacecom.rabbitmq.client.Channel
-
basicQos
public void basicQos(int prefetchSize, int prefetchCount, boolean global) throws IOException- Specified by:
basicQosin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
basicQos
public void basicQos(int prefetchCount, boolean global) throws IOExceptionAdded to the 3.3.x client.- Specified by:
basicQosin interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 1.3.3
-
basicQos
public void basicQos(int prefetchCount) throws IOException- Specified by:
basicQosin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
basicPublish
public void basicPublish(String exchange, String routingKey, com.rabbitmq.client.AMQP.BasicProperties props, byte[] body) throws IOException
- Specified by:
basicPublishin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
basicPublish
public void basicPublish(String exchange, String routingKey, boolean mandatory, boolean immediate, com.rabbitmq.client.AMQP.BasicProperties props, byte[] body) throws IOException
- Specified by:
basicPublishin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
basicPublish
public void basicPublish(String exchange, String routingKey, boolean mandatory, com.rabbitmq.client.AMQP.BasicProperties props, byte[] body) throws IOException
- Specified by:
basicPublishin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeDeclare
public com.rabbitmq.client.AMQP.Exchange.DeclareOk exchangeDeclare(String exchange, String type) throws IOException
- Specified by:
exchangeDeclarein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeDeclare
public com.rabbitmq.client.AMQP.Exchange.DeclareOk exchangeDeclare(String exchange, com.rabbitmq.client.BuiltinExchangeType type) throws IOException
- Specified by:
exchangeDeclarein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeDeclare
public com.rabbitmq.client.AMQP.Exchange.DeclareOk exchangeDeclare(String exchange, String type, boolean durable) throws IOException
- Specified by:
exchangeDeclarein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeDeclare
public com.rabbitmq.client.AMQP.Exchange.DeclareOk exchangeDeclare(String exchange, com.rabbitmq.client.BuiltinExchangeType type, boolean durable) throws IOException
- Specified by:
exchangeDeclarein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeDeclare
public com.rabbitmq.client.AMQP.Exchange.DeclareOk exchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, Map<String,Object> arguments) throws IOException
- Specified by:
exchangeDeclarein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeDeclare
public com.rabbitmq.client.AMQP.Exchange.DeclareOk exchangeDeclare(String exchange, com.rabbitmq.client.BuiltinExchangeType type, boolean durable, boolean autoDelete, Map<String,Object> arguments) throws IOException
- Specified by:
exchangeDeclarein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeDeclare
public com.rabbitmq.client.AMQP.Exchange.DeclareOk exchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, boolean internal, Map<String,Object> arguments) throws IOException
- Specified by:
exchangeDeclarein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeDeclare
public com.rabbitmq.client.AMQP.Exchange.DeclareOk exchangeDeclare(String exchange, com.rabbitmq.client.BuiltinExchangeType type, boolean durable, boolean autoDelete, boolean internal, Map<String,Object> arguments) throws IOException
- Specified by:
exchangeDeclarein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeDeclarePassive
public com.rabbitmq.client.AMQP.Exchange.DeclareOk exchangeDeclarePassive(String name) throws IOException
- Specified by:
exchangeDeclarePassivein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeDelete
public com.rabbitmq.client.AMQP.Exchange.DeleteOk exchangeDelete(String exchange, boolean ifUnused) throws IOException
- Specified by:
exchangeDeletein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeDelete
public com.rabbitmq.client.AMQP.Exchange.DeleteOk exchangeDelete(String exchange) throws IOException
- Specified by:
exchangeDeletein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeBind
public com.rabbitmq.client.AMQP.Exchange.BindOk exchangeBind(String destination, String source, String routingKey) throws IOException
- Specified by:
exchangeBindin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeBind
public com.rabbitmq.client.AMQP.Exchange.BindOk exchangeBind(String destination, String source, String routingKey, Map<String,Object> arguments) throws IOException
- Specified by:
exchangeBindin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeUnbind
public com.rabbitmq.client.AMQP.Exchange.UnbindOk exchangeUnbind(String destination, String source, String routingKey) throws IOException
- Specified by:
exchangeUnbindin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeUnbind
public com.rabbitmq.client.AMQP.Exchange.UnbindOk exchangeUnbind(String destination, String source, String routingKey, Map<String,Object> arguments) throws IOException
- Specified by:
exchangeUnbindin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
queueDeclare
public com.rabbitmq.client.AMQP.Queue.DeclareOk queueDeclare() throws IOException- Specified by:
queueDeclarein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
queueDeclare
public com.rabbitmq.client.AMQP.Queue.DeclareOk queueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete, Map<String,Object> arguments) throws IOException
- Specified by:
queueDeclarein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
queueDeclarePassive
public com.rabbitmq.client.AMQP.Queue.DeclareOk queueDeclarePassive(String queue) throws IOException
- Specified by:
queueDeclarePassivein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
queueDelete
public com.rabbitmq.client.AMQP.Queue.DeleteOk queueDelete(String queue) throws IOException
- Specified by:
queueDeletein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
queueDelete
public com.rabbitmq.client.AMQP.Queue.DeleteOk queueDelete(String queue, boolean ifUnused, boolean ifEmpty) throws IOException
- Specified by:
queueDeletein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
queueBind
public com.rabbitmq.client.AMQP.Queue.BindOk queueBind(String queue, String exchange, String routingKey) throws IOException
- Specified by:
queueBindin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
queueBind
public com.rabbitmq.client.AMQP.Queue.BindOk queueBind(String queue, String exchange, String routingKey, Map<String,Object> arguments) throws IOException
- Specified by:
queueBindin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
queueUnbind
public com.rabbitmq.client.AMQP.Queue.UnbindOk queueUnbind(String queue, String exchange, String routingKey) throws IOException
- Specified by:
queueUnbindin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
queueUnbind
public com.rabbitmq.client.AMQP.Queue.UnbindOk queueUnbind(String queue, String exchange, String routingKey, Map<String,Object> arguments) throws IOException
- Specified by:
queueUnbindin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
queuePurge
public com.rabbitmq.client.AMQP.Queue.PurgeOk queuePurge(String queue) throws IOException
- Specified by:
queuePurgein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
basicGet
public com.rabbitmq.client.GetResponse basicGet(String queue, boolean autoAck) throws IOException
- Specified by:
basicGetin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
basicAck
public void basicAck(long deliveryTag, boolean multiple) throws IOException- Specified by:
basicAckin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
basicNack
public void basicNack(long deliveryTag, boolean multiple, boolean requeue) throws IOException- Specified by:
basicNackin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
basicReject
public void basicReject(long deliveryTag, boolean requeue) throws IOException- Specified by:
basicRejectin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
basicConsume
public String basicConsume(String queue, com.rabbitmq.client.Consumer callback) throws IOException
- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
basicConsume
public String basicConsume(String queue, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback) throws IOException
Added to the 5.0.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
basicConsume
public String basicConsume(String queue, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException
Added to the 5.0.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
basicConsume
public String basicConsume(String queue, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException
Added to the 5.0.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
basicConsume
public String basicConsume(String queue, boolean autoAck, com.rabbitmq.client.Consumer callback) throws IOException
- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
basicConsume
public String basicConsume(String queue, boolean autoAck, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback) throws IOException
Added to the 5.0.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
basicConsume
public String basicConsume(String queue, boolean autoAck, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException
Added to the 5.0.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
basicConsume
public String basicConsume(String queue, boolean autoAck, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException
Added to the 5.0.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
basicConsume
public String basicConsume(String queue, boolean autoAck, String consumerTag, com.rabbitmq.client.Consumer callback) throws IOException
- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
basicConsume
public String basicConsume(String queue, boolean autoAck, String consumerTag, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback) throws IOException
Added to the 5.0.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
basicConsume
public String basicConsume(String queue, boolean autoAck, String consumerTag, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException
Added to the 5.0.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
basicConsume
public String basicConsume(String queue, boolean autoAck, String consumerTag, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException
Added to the 5.0.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
basicConsume
public String basicConsume(String queue, boolean autoAck, Map<String,Object> arguments, com.rabbitmq.client.Consumer callback) throws IOException
Added to the 3.3.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 1.3.3
-
basicConsume
public String basicConsume(String queue, boolean autoAck, Map<String,Object> arguments, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback) throws IOException
Added to the 5.0.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
basicConsume
public String basicConsume(String queue, boolean autoAck, Map<String,Object> arguments, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException
Added to the 5.0.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
basicConsume
public String basicConsume(String queue, boolean autoAck, Map<String,Object> arguments, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException
Added to the 5.0.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
basicConsume
public String basicConsume(String queue, boolean autoAck, String consumerTag, boolean noLocal, boolean exclusive, Map<String,Object> arguments, com.rabbitmq.client.Consumer callback) throws IOException
- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
basicConsume
public String basicConsume(String queue, boolean autoAck, String consumerTag, boolean noLocal, boolean exclusive, Map<String,Object> arguments, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback) throws IOException
Added to the 5.0.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
basicConsume
public String basicConsume(String queue, boolean autoAck, String consumerTag, boolean noLocal, boolean exclusive, Map<String,Object> arguments, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException
Added to the 5.0.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
basicConsume
public String basicConsume(String queue, boolean autoAck, String consumerTag, boolean noLocal, boolean exclusive, Map<String,Object> arguments, com.rabbitmq.client.DeliverCallback deliverCallback, com.rabbitmq.client.CancelCallback cancelCallback, com.rabbitmq.client.ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException
Added to the 5.0.x client.- Specified by:
basicConsumein interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
basicCancel
public void basicCancel(String consumerTag) throws IOException
- Specified by:
basicCancelin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
basicRecover
public com.rabbitmq.client.AMQP.Basic.RecoverOk basicRecover() throws IOException- Specified by:
basicRecoverin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
basicRecover
public com.rabbitmq.client.AMQP.Basic.RecoverOk basicRecover(boolean requeue) throws IOException- Specified by:
basicRecoverin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
txSelect
public com.rabbitmq.client.AMQP.Tx.SelectOk txSelect() throws IOException- Specified by:
txSelectin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
txCommit
public com.rabbitmq.client.AMQP.Tx.CommitOk txCommit() throws IOException- Specified by:
txCommitin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
txRollback
public com.rabbitmq.client.AMQP.Tx.RollbackOk txRollback() throws IOException- Specified by:
txRollbackin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
confirmSelect
public com.rabbitmq.client.AMQP.Confirm.SelectOk confirmSelect() throws IOException- Specified by:
confirmSelectin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
getNextPublishSeqNo
public long getNextPublishSeqNo()
- Specified by:
getNextPublishSeqNoin interfacecom.rabbitmq.client.Channel
-
waitForConfirms
public boolean waitForConfirms() throws InterruptedException- Specified by:
waitForConfirmsin interfacecom.rabbitmq.client.Channel- Throws:
InterruptedException
-
waitForConfirms
public boolean waitForConfirms(long timeout) throws InterruptedException, TimeoutException- Specified by:
waitForConfirmsin interfacecom.rabbitmq.client.Channel- Throws:
InterruptedExceptionTimeoutException
-
waitForConfirmsOrDie
public void waitForConfirmsOrDie() throws IOException, InterruptedException- Specified by:
waitForConfirmsOrDiein interfacecom.rabbitmq.client.Channel- Throws:
IOExceptionInterruptedException
-
waitForConfirmsOrDie
public void waitForConfirmsOrDie(long timeout) throws IOException, InterruptedException, TimeoutException- Specified by:
waitForConfirmsOrDiein interfacecom.rabbitmq.client.Channel- Throws:
IOExceptionInterruptedExceptionTimeoutException
-
asyncRpc
public void asyncRpc(com.rabbitmq.client.Method method) throws IOException- Specified by:
asyncRpcin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
rpc
public com.rabbitmq.client.Command rpc(com.rabbitmq.client.Method method) throws IOException- Specified by:
rpcin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
addConfirmListener
public void addConfirmListener(com.rabbitmq.client.ConfirmListener listener)
- Specified by:
addConfirmListenerin interfacecom.rabbitmq.client.Channel
-
addConfirmListener
public com.rabbitmq.client.ConfirmListener addConfirmListener(com.rabbitmq.client.ConfirmCallback ackCallback, com.rabbitmq.client.ConfirmCallback nackCallback)- Specified by:
addConfirmListenerin interfacecom.rabbitmq.client.Channel
-
removeConfirmListener
public boolean removeConfirmListener(com.rabbitmq.client.ConfirmListener listener)
- Specified by:
removeConfirmListenerin interfacecom.rabbitmq.client.Channel
-
clearConfirmListeners
public void clearConfirmListeners()
- Specified by:
clearConfirmListenersin interfacecom.rabbitmq.client.Channel
-
addReturnListener
public void addReturnListener(com.rabbitmq.client.ReturnListener listener)
- Specified by:
addReturnListenerin interfacecom.rabbitmq.client.Channel
-
addReturnListener
public com.rabbitmq.client.ReturnListener addReturnListener(com.rabbitmq.client.ReturnCallback returnCallback)
Added to the 5.0.x client.- Specified by:
addReturnListenerin interfacecom.rabbitmq.client.Channel- Since:
- 2.0
-
removeReturnListener
public boolean removeReturnListener(com.rabbitmq.client.ReturnListener listener)
- Specified by:
removeReturnListenerin interfacecom.rabbitmq.client.Channel
-
clearReturnListeners
public void clearReturnListeners()
- Specified by:
clearReturnListenersin interfacecom.rabbitmq.client.Channel
-
exchangeBindNoWait
public void exchangeBindNoWait(String destination, String source, String routingKey, Map<String,Object> arguments) throws IOException
- Specified by:
exchangeBindNoWaitin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeDeclareNoWait
public void exchangeDeclareNoWait(String exchange, String type, boolean durable, boolean autoDelete, boolean internal, Map<String,Object> arguments) throws IOException
- Specified by:
exchangeDeclareNoWaitin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeDeclareNoWait
public void exchangeDeclareNoWait(String exchange, com.rabbitmq.client.BuiltinExchangeType type, boolean durable, boolean autoDelete, boolean internal, Map<String,Object> arguments) throws IOException
- Specified by:
exchangeDeclareNoWaitin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeDeleteNoWait
public void exchangeDeleteNoWait(String exchange, boolean ifUnused) throws IOException
- Specified by:
exchangeDeleteNoWaitin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
exchangeUnbindNoWait
public void exchangeUnbindNoWait(String destination, String source, String routingKey, Map<String,Object> arguments) throws IOException
- Specified by:
exchangeUnbindNoWaitin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
queueBindNoWait
public void queueBindNoWait(String queue, String exchange, String routingKey, Map<String,Object> arguments) throws IOException
- Specified by:
queueBindNoWaitin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
queueDeclareNoWait
public void queueDeclareNoWait(String queue, boolean durable, boolean exclusive, boolean autoDelete, Map<String,Object> arguments) throws IOException
- Specified by:
queueDeclareNoWaitin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
queueDeleteNoWait
public void queueDeleteNoWait(String queue, boolean ifUnused, boolean ifEmpty) throws IOException
- Specified by:
queueDeleteNoWaitin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
consumerCount
public long consumerCount(String queue) throws IOException
- Specified by:
consumerCountin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
asyncCompletableRpc
public CompletableFuture<com.rabbitmq.client.Command> asyncCompletableRpc(com.rabbitmq.client.Method method) throws IOException
Added to the 5.0.x client.- Specified by:
asyncCompletableRpcin interfacecom.rabbitmq.client.Channel- Throws:
IOException- Since:
- 2.0
-
messageCount
public long messageCount(String queue) throws IOException
- Specified by:
messageCountin interfacecom.rabbitmq.client.Channel- Throws:
IOException
-
getDelegate
public com.rabbitmq.client.Channel getDelegate()
Description copied from interface:PublisherCallbackChannelUse this to invoke methods on the underlying rabbit clientChannelthat are not supported by this implementation.- Specified by:
getDelegatein interfacePublisherCallbackChannel- Returns:
- The underlying rabbit client
Channel.
-
close
public void close() throws IOException, TimeoutException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacecom.rabbitmq.client.Channel- Throws:
IOExceptionTimeoutException
-
getPendingConfirmsCount
public int getPendingConfirmsCount(PublisherCallbackChannel.Listener listener)
Description copied from interface:PublisherCallbackChannelGet thePendingConfirms count.- Specified by:
getPendingConfirmsCountin interfacePublisherCallbackChannel- Parameters:
listener- the listener.- Returns:
- Count of the pending confirms.
-
getPendingConfirmsCount
public int getPendingConfirmsCount()
Description copied from interface:PublisherCallbackChannelGet the total pending confirms count.- Specified by:
getPendingConfirmsCountin interfacePublisherCallbackChannel- Returns:
- the count.
-
addListener
public void addListener(PublisherCallbackChannel.Listener listener)
Add the listener and return the internal map of pending confirmations for that listener.- Specified by:
addListenerin interfacePublisherCallbackChannel- Parameters:
listener- the listener.
-
expire
public Collection<PendingConfirm> expire(PublisherCallbackChannel.Listener listener, long cutoffTime)
Description copied from interface:PublisherCallbackChannelExpire (remove) anyPendingConfirms created before cutoffTime for the supplied listener and return them to the caller.- Specified by:
expirein interfacePublisherCallbackChannel- Parameters:
listener- the listener.cutoffTime- the time before which expired messages were created.- Returns:
- the list of expired confirms.
-
handleAck
public void handleAck(long seq, boolean multiple)- Specified by:
handleAckin interfacecom.rabbitmq.client.ConfirmListener
-
handleNack
public void handleNack(long seq, boolean multiple)- Specified by:
handleNackin interfacecom.rabbitmq.client.ConfirmListener
-
addPendingConfirm
public void addPendingConfirm(PublisherCallbackChannel.Listener listener, long seq, PendingConfirm pendingConfirm)
Description copied from interface:PublisherCallbackChannelAdds a pending confirmation to this channel's map.- Specified by:
addPendingConfirmin interfacePublisherCallbackChannel- Parameters:
listener- The listener.seq- The key to the map.pendingConfirm- The PendingConfirm object.
-
handle
public void handle(com.rabbitmq.client.Return returned)
- Specified by:
handlein interfacecom.rabbitmq.client.ReturnCallback
-
shutdownCompleted
public void shutdownCompleted(com.rabbitmq.client.ShutdownSignalException cause)
- Specified by:
shutdownCompletedin interfacecom.rabbitmq.client.ShutdownListener
-
factory
public static PublisherCallbackChannelFactory factory()
-
-