Package io.vertx.rxjava3.rabbitmq
Class RabbitMQClient
- java.lang.Object
-
- io.vertx.rxjava3.rabbitmq.RabbitMQClient
-
- All Implemented Interfaces:
RxDelegate
public class RabbitMQClient extends Object implements RxDelegate
NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<RabbitMQClient>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description RabbitMQClient(RabbitMQClient delegate)
RabbitMQClient(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.reactivex.rxjava3.core.Single<ReadStream<RabbitMQConfirmation>>
addConfirmListener(int maxQueueSize)
Add a Confirm Listener to the channel.io.reactivex.rxjava3.core.Completable
basicAck(long deliveryTag, boolean multiple)
Acknowledge one or several received messages.io.reactivex.rxjava3.core.Single<RabbitMQConsumer>
basicConsumer(String queue)
io.reactivex.rxjava3.core.Single<RabbitMQConsumer>
basicConsumer(String queue, QueueOptions options)
Create a consumer with the givenoptions
.io.reactivex.rxjava3.core.Single<RabbitMQMessage>
basicGet(String queue, boolean autoAck)
Retrieve a message from a queue using AMQP.Basic.Getio.reactivex.rxjava3.core.Completable
basicNack(long deliveryTag, boolean multiple, boolean requeue)
Reject one or several received messages.io.reactivex.rxjava3.core.Completable
basicPublish(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body)
Publish a message.io.reactivex.rxjava3.core.Completable
basicPublish(String exchange, String routingKey, Buffer body)
Publish a message.io.reactivex.rxjava3.core.Completable
basicPublishWithDeliveryTag(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body, Handler<Long> deliveryTagHandler)
Publish a message.io.reactivex.rxjava3.core.Completable
basicQos(int prefetchCount)
Request a specific prefetchCount "quality of service" settings for this channel.io.reactivex.rxjava3.core.Completable
basicQos(int prefetchCount, boolean global)
Request a specific prefetchCount "quality of service" settings for this channel.io.reactivex.rxjava3.core.Completable
basicQos(int prefetchSize, int prefetchCount, boolean global)
Request specific "quality of service" settings.io.reactivex.rxjava3.core.Completable
confirmSelect()
Enables publisher acknowledgements on this channel.static RabbitMQClient
create(Vertx vertx)
Create and return a client configured with the default options.static RabbitMQClient
create(Vertx vertx, RabbitMQOptions config)
Create and return a client.boolean
equals(Object o)
io.reactivex.rxjava3.core.Completable
exchangeBind(String destination, String source, String routingKey)
Bind an exchange to an exchange.io.reactivex.rxjava3.core.Completable
exchangeBind(String destination, String source, String routingKey, Map<String,Object> arguments)
Bind an exchange to an exchange.io.reactivex.rxjava3.core.Completable
exchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete)
Declare an exchange.io.reactivex.rxjava3.core.Completable
exchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, JsonObject config)
Declare an exchange with additional parameters such as dead lettering, an alternate exchange or TTL.io.reactivex.rxjava3.core.Completable
exchangeDelete(String exchange)
Delete an exchange, without regard for whether it is in use or not.io.reactivex.rxjava3.core.Completable
exchangeUnbind(String destination, String source, String routingKey)
Unbind an exchange from an exchange.io.reactivex.rxjava3.core.Completable
exchangeUnbind(String destination, String source, String routingKey, Map<String,Object> arguments)
Unbind an exchange from an exchange.RabbitMQClient
getDelegate()
int
hashCode()
boolean
isConnected()
Check if a connection is openboolean
isOpenChannel()
Check if a channel is openio.reactivex.rxjava3.core.Single<Long>
messageCount(String queue)
Returns the number of messages in a queue ready to be delivered.static RabbitMQClient
newInstance(RabbitMQClient arg)
io.reactivex.rxjava3.core.Completable
queueBind(String queue, String exchange, String routingKey)
Bind a queue to an exchangeio.reactivex.rxjava3.core.Completable
queueBind(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Bind a queue to an exchangeio.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeclareOk>
queueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete)
Declare a queueio.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeclareOk>
queueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete, JsonObject config)
Declare a queue with config optionsio.reactivex.rxjava3.core.Single<JsonObject>
queueDeclareAuto()
Actively declare a server-named exclusive, autodelete, non-durable queue.io.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeleteOk>
queueDelete(String queue)
Delete a queue, without regard for whether it is in use or has messages on itio.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeleteOk>
queueDeleteIf(String queue, boolean ifUnused, boolean ifEmpty)
Delete a queueio.reactivex.rxjava3.core.Completable
queueUnbind(String queue, String exchange, String routingKey)
Unbind a queue from an exchangeio.reactivex.rxjava3.core.Completable
queueUnbind(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Unbind a queue from an exchangeio.reactivex.rxjava3.core.Completable
restartConnect(int attempts)
restart the rabbitMQ connect.io.reactivex.rxjava3.core.Single<ReadStream<RabbitMQConfirmation>>
rxAddConfirmListener(int maxQueueSize)
Add a Confirm Listener to the channel.io.reactivex.rxjava3.core.Completable
rxBasicAck(long deliveryTag, boolean multiple)
Acknowledge one or several received messages.io.reactivex.rxjava3.core.Single<RabbitMQConsumer>
rxBasicConsumer(String queue)
io.reactivex.rxjava3.core.Single<RabbitMQConsumer>
rxBasicConsumer(String queue, QueueOptions options)
Create a consumer with the givenoptions
.io.reactivex.rxjava3.core.Single<RabbitMQMessage>
rxBasicGet(String queue, boolean autoAck)
Retrieve a message from a queue using AMQP.Basic.Getio.reactivex.rxjava3.core.Completable
rxBasicNack(long deliveryTag, boolean multiple, boolean requeue)
Reject one or several received messages.io.reactivex.rxjava3.core.Completable
rxBasicPublish(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body)
Publish a message.io.reactivex.rxjava3.core.Completable
rxBasicPublish(String exchange, String routingKey, Buffer body)
Publish a message.io.reactivex.rxjava3.core.Completable
rxBasicPublishWithDeliveryTag(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body, Handler<Long> deliveryTagHandler)
Publish a message.io.reactivex.rxjava3.core.Completable
rxBasicQos(int prefetchCount)
Request a specific prefetchCount "quality of service" settings for this channel.io.reactivex.rxjava3.core.Completable
rxBasicQos(int prefetchCount, boolean global)
Request a specific prefetchCount "quality of service" settings for this channel.io.reactivex.rxjava3.core.Completable
rxBasicQos(int prefetchSize, int prefetchCount, boolean global)
Request specific "quality of service" settings.io.reactivex.rxjava3.core.Completable
rxConfirmSelect()
Enables publisher acknowledgements on this channel.io.reactivex.rxjava3.core.Completable
rxExchangeBind(String destination, String source, String routingKey)
Bind an exchange to an exchange.io.reactivex.rxjava3.core.Completable
rxExchangeBind(String destination, String source, String routingKey, Map<String,Object> arguments)
Bind an exchange to an exchange.io.reactivex.rxjava3.core.Completable
rxExchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete)
Declare an exchange.io.reactivex.rxjava3.core.Completable
rxExchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, JsonObject config)
Declare an exchange with additional parameters such as dead lettering, an alternate exchange or TTL.io.reactivex.rxjava3.core.Completable
rxExchangeDelete(String exchange)
Delete an exchange, without regard for whether it is in use or not.io.reactivex.rxjava3.core.Completable
rxExchangeUnbind(String destination, String source, String routingKey)
Unbind an exchange from an exchange.io.reactivex.rxjava3.core.Completable
rxExchangeUnbind(String destination, String source, String routingKey, Map<String,Object> arguments)
Unbind an exchange from an exchange.io.reactivex.rxjava3.core.Single<Long>
rxMessageCount(String queue)
Returns the number of messages in a queue ready to be delivered.io.reactivex.rxjava3.core.Completable
rxQueueBind(String queue, String exchange, String routingKey)
Bind a queue to an exchangeio.reactivex.rxjava3.core.Completable
rxQueueBind(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Bind a queue to an exchangeio.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeclareOk>
rxQueueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete)
Declare a queueio.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeclareOk>
rxQueueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete, JsonObject config)
Declare a queue with config optionsio.reactivex.rxjava3.core.Single<JsonObject>
rxQueueDeclareAuto()
Actively declare a server-named exclusive, autodelete, non-durable queue.io.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeleteOk>
rxQueueDelete(String queue)
Delete a queue, without regard for whether it is in use or has messages on itio.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeleteOk>
rxQueueDeleteIf(String queue, boolean ifUnused, boolean ifEmpty)
Delete a queueio.reactivex.rxjava3.core.Completable
rxQueueUnbind(String queue, String exchange, String routingKey)
Unbind a queue from an exchangeio.reactivex.rxjava3.core.Completable
rxQueueUnbind(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Unbind a queue from an exchangeio.reactivex.rxjava3.core.Completable
rxRestartConnect(int attempts)
restart the rabbitMQ connect.io.reactivex.rxjava3.core.Completable
rxStart()
Start the rabbitMQ client.io.reactivex.rxjava3.core.Completable
rxStop()
Stop the rabbitMQ client.io.reactivex.rxjava3.core.Completable
rxWaitForConfirms()
Wait until all messages published since the last call have been either ack'd or nack'd by the broker.io.reactivex.rxjava3.core.Completable
rxWaitForConfirms(long timeout)
Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses.io.reactivex.rxjava3.core.Completable
start()
Start the rabbitMQ client.io.reactivex.rxjava3.core.Completable
stop()
Stop the rabbitMQ client.String
toString()
io.reactivex.rxjava3.core.Completable
waitForConfirms()
Wait until all messages published since the last call have been either ack'd or nack'd by the broker.io.reactivex.rxjava3.core.Completable
waitForConfirms(long timeout)
Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses.
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<RabbitMQClient> __TYPE_ARG
-
-
Constructor Detail
-
RabbitMQClient
public RabbitMQClient(RabbitMQClient delegate)
-
RabbitMQClient
public RabbitMQClient(Object delegate)
-
-
Method Detail
-
getDelegate
public RabbitMQClient getDelegate()
- Specified by:
getDelegate
in interfaceRxDelegate
-
create
public static RabbitMQClient create(Vertx vertx)
Create and return a client configured with the default options.- Parameters:
vertx
- the vertx instance- Returns:
- the client
-
create
public static RabbitMQClient create(Vertx vertx, RabbitMQOptions config)
Create and return a client.- Parameters:
vertx
- the vertx instanceconfig
- the client config- Returns:
- the client
-
basicAck
public io.reactivex.rxjava3.core.Completable basicAck(long deliveryTag, boolean multiple)
Acknowledge one or several received messages. Supply the deliveryTag from the AMQP.Basic.GetOk or AMQP.Basic.Deliver method containing the received message being acknowledged.- Parameters:
deliveryTag
-multiple
-- Returns:
-
rxBasicAck
public io.reactivex.rxjava3.core.Completable rxBasicAck(long deliveryTag, boolean multiple)
Acknowledge one or several received messages. Supply the deliveryTag from the AMQP.Basic.GetOk or AMQP.Basic.Deliver method containing the received message being acknowledged.- Parameters:
deliveryTag
-multiple
-- Returns:
-
basicNack
public io.reactivex.rxjava3.core.Completable basicNack(long deliveryTag, boolean multiple, boolean requeue)
Reject one or several received messages.- Parameters:
deliveryTag
-multiple
-requeue
-- Returns:
-
rxBasicNack
public io.reactivex.rxjava3.core.Completable rxBasicNack(long deliveryTag, boolean multiple, boolean requeue)
Reject one or several received messages.- Parameters:
deliveryTag
-multiple
-requeue
-- Returns:
-
basicGet
public io.reactivex.rxjava3.core.Single<RabbitMQMessage> basicGet(String queue, boolean autoAck)
Retrieve a message from a queue using AMQP.Basic.Get- Parameters:
queue
-autoAck
-- Returns:
-
rxBasicGet
public io.reactivex.rxjava3.core.Single<RabbitMQMessage> rxBasicGet(String queue, boolean autoAck)
Retrieve a message from a queue using AMQP.Basic.Get- Parameters:
queue
-autoAck
-- Returns:
-
basicConsumer
public io.reactivex.rxjava3.core.Single<RabbitMQConsumer> basicConsumer(String queue)
- Parameters:
queue
-- Returns:
-
rxBasicConsumer
public io.reactivex.rxjava3.core.Single<RabbitMQConsumer> rxBasicConsumer(String queue)
- Parameters:
queue
-- Returns:
-
basicConsumer
public io.reactivex.rxjava3.core.Single<RabbitMQConsumer> basicConsumer(String queue, QueueOptions options)
Create a consumer with the givenoptions
.- Parameters:
queue
- the name of a queueoptions
- options for queue- Returns:
-
rxBasicConsumer
public io.reactivex.rxjava3.core.Single<RabbitMQConsumer> rxBasicConsumer(String queue, QueueOptions options)
Create a consumer with the givenoptions
.- Parameters:
queue
- the name of a queueoptions
- options for queue- Returns:
-
basicPublish
public io.reactivex.rxjava3.core.Completable basicPublish(String exchange, String routingKey, Buffer body)
Publish a message. Publishing to a non-existent exchange will result in a channel-level protocol exception, which closes the channel. Invocations of Channel#basicPublish will eventually block if a resource-driven alarm is in effect.- Parameters:
exchange
-routingKey
-body
-- Returns:
-
rxBasicPublish
public io.reactivex.rxjava3.core.Completable rxBasicPublish(String exchange, String routingKey, Buffer body)
Publish a message. Publishing to a non-existent exchange will result in a channel-level protocol exception, which closes the channel. Invocations of Channel#basicPublish will eventually block if a resource-driven alarm is in effect.- Parameters:
exchange
-routingKey
-body
-- Returns:
-
addConfirmListener
public io.reactivex.rxjava3.core.Single<ReadStream<RabbitMQConfirmation>> addConfirmListener(int maxQueueSize)
Add a Confirm Listener to the channel. Note that this will automatically call confirmSelect, it is not necessary to call that too.- Parameters:
maxQueueSize
- maximum size of the queue of confirmations- Returns:
-
rxAddConfirmListener
public io.reactivex.rxjava3.core.Single<ReadStream<RabbitMQConfirmation>> rxAddConfirmListener(int maxQueueSize)
Add a Confirm Listener to the channel. Note that this will automatically call confirmSelect, it is not necessary to call that too.- Parameters:
maxQueueSize
- maximum size of the queue of confirmations- Returns:
-
confirmSelect
public io.reactivex.rxjava3.core.Completable confirmSelect()
Enables publisher acknowledgements on this channel. Can be called once during client initialisation. Calls to basicPublish() will have to be confirmed.- Returns:
-
rxConfirmSelect
public io.reactivex.rxjava3.core.Completable rxConfirmSelect()
Enables publisher acknowledgements on this channel. Can be called once during client initialisation. Calls to basicPublish() will have to be confirmed.- Returns:
-
waitForConfirms
public io.reactivex.rxjava3.core.Completable waitForConfirms()
Wait until all messages published since the last call have been either ack'd or nack'd by the broker. This will incur slight performance loss at the expense of higher write consistency. If desired, multiple calls to basicPublish() can be batched before confirming.- Returns:
-
rxWaitForConfirms
public io.reactivex.rxjava3.core.Completable rxWaitForConfirms()
Wait until all messages published since the last call have been either ack'd or nack'd by the broker. This will incur slight performance loss at the expense of higher write consistency. If desired, multiple calls to basicPublish() can be batched before confirming.- Returns:
-
waitForConfirms
public io.reactivex.rxjava3.core.Completable waitForConfirms(long timeout)
Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses. If the timeout expires a TimeoutException is thrown.- Parameters:
timeout
-- Returns:
-
rxWaitForConfirms
public io.reactivex.rxjava3.core.Completable rxWaitForConfirms(long timeout)
Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses. If the timeout expires a TimeoutException is thrown.- Parameters:
timeout
-- Returns:
-
basicQos
public io.reactivex.rxjava3.core.Completable basicQos(int prefetchCount)
Request a specific prefetchCount "quality of service" settings for this channel.- Parameters:
prefetchCount
- maximum number of messages that the server will deliver, 0 if unlimited- Returns:
-
rxBasicQos
public io.reactivex.rxjava3.core.Completable rxBasicQos(int prefetchCount)
Request a specific prefetchCount "quality of service" settings for this channel.- Parameters:
prefetchCount
- maximum number of messages that the server will deliver, 0 if unlimited- Returns:
-
basicQos
public io.reactivex.rxjava3.core.Completable basicQos(int prefetchCount, boolean global)
Request a specific prefetchCount "quality of service" settings for this channel.- Parameters:
prefetchCount
- maximum number of messages that the server will deliver, 0 if unlimitedglobal
- true if the settings should be applied to the entire channel rather than each consumer- Returns:
-
rxBasicQos
public io.reactivex.rxjava3.core.Completable rxBasicQos(int prefetchCount, boolean global)
Request a specific prefetchCount "quality of service" settings for this channel.- Parameters:
prefetchCount
- maximum number of messages that the server will deliver, 0 if unlimitedglobal
- true if the settings should be applied to the entire channel rather than each consumer- Returns:
-
basicQos
public io.reactivex.rxjava3.core.Completable basicQos(int prefetchSize, int prefetchCount, boolean global)
Request specific "quality of service" settings. These settings impose limits on the amount of data the server will deliver to consumers before requiring acknowledgements. Thus they provide a means of consumer-initiated flow control.- Parameters:
prefetchSize
- maximum amount of content (measured in octets) that the server will deliver, 0 if unlimitedprefetchCount
- maximum number of messages that the server will deliver, 0 if unlimitedglobal
- true if the settings should be applied to the entire channel rather than each consumer- Returns:
-
rxBasicQos
public io.reactivex.rxjava3.core.Completable rxBasicQos(int prefetchSize, int prefetchCount, boolean global)
Request specific "quality of service" settings. These settings impose limits on the amount of data the server will deliver to consumers before requiring acknowledgements. Thus they provide a means of consumer-initiated flow control.- Parameters:
prefetchSize
- maximum amount of content (measured in octets) that the server will deliver, 0 if unlimitedprefetchCount
- maximum number of messages that the server will deliver, 0 if unlimitedglobal
- true if the settings should be applied to the entire channel rather than each consumer- Returns:
-
exchangeDeclare
public io.reactivex.rxjava3.core.Completable exchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete)
Declare an exchange.- Parameters:
exchange
-type
-durable
-autoDelete
-- Returns:
-
rxExchangeDeclare
public io.reactivex.rxjava3.core.Completable rxExchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete)
Declare an exchange.- Parameters:
exchange
-type
-durable
-autoDelete
-- Returns:
-
exchangeDeclare
public io.reactivex.rxjava3.core.Completable exchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, JsonObject config)
Declare an exchange with additional parameters such as dead lettering, an alternate exchange or TTL.- Parameters:
exchange
-type
-durable
-autoDelete
-config
-- Returns:
-
rxExchangeDeclare
public io.reactivex.rxjava3.core.Completable rxExchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, JsonObject config)
Declare an exchange with additional parameters such as dead lettering, an alternate exchange or TTL.- Parameters:
exchange
-type
-durable
-autoDelete
-config
-- Returns:
-
exchangeDelete
public io.reactivex.rxjava3.core.Completable exchangeDelete(String exchange)
Delete an exchange, without regard for whether it is in use or not.- Parameters:
exchange
-- Returns:
-
rxExchangeDelete
public io.reactivex.rxjava3.core.Completable rxExchangeDelete(String exchange)
Delete an exchange, without regard for whether it is in use or not.- Parameters:
exchange
-- Returns:
-
exchangeBind
public io.reactivex.rxjava3.core.Completable exchangeBind(String destination, String source, String routingKey)
Bind an exchange to an exchange.- Parameters:
destination
-source
-routingKey
-- Returns:
-
rxExchangeBind
public io.reactivex.rxjava3.core.Completable rxExchangeBind(String destination, String source, String routingKey)
Bind an exchange to an exchange.- Parameters:
destination
-source
-routingKey
-- Returns:
-
exchangeBind
public io.reactivex.rxjava3.core.Completable exchangeBind(String destination, String source, String routingKey, Map<String,Object> arguments)
Bind an exchange to an exchange.- Parameters:
destination
-source
-routingKey
-arguments
-- Returns:
-
rxExchangeBind
public io.reactivex.rxjava3.core.Completable rxExchangeBind(String destination, String source, String routingKey, Map<String,Object> arguments)
Bind an exchange to an exchange.- Parameters:
destination
-source
-routingKey
-arguments
-- Returns:
-
exchangeUnbind
public io.reactivex.rxjava3.core.Completable exchangeUnbind(String destination, String source, String routingKey)
Unbind an exchange from an exchange.- Parameters:
destination
-source
-routingKey
-- Returns:
-
rxExchangeUnbind
public io.reactivex.rxjava3.core.Completable rxExchangeUnbind(String destination, String source, String routingKey)
Unbind an exchange from an exchange.- Parameters:
destination
-source
-routingKey
-- Returns:
-
exchangeUnbind
public io.reactivex.rxjava3.core.Completable exchangeUnbind(String destination, String source, String routingKey, Map<String,Object> arguments)
Unbind an exchange from an exchange.- Parameters:
destination
-source
-routingKey
-arguments
-- Returns:
-
rxExchangeUnbind
public io.reactivex.rxjava3.core.Completable rxExchangeUnbind(String destination, String source, String routingKey, Map<String,Object> arguments)
Unbind an exchange from an exchange.- Parameters:
destination
-source
-routingKey
-arguments
-- Returns:
-
queueDeclareAuto
public io.reactivex.rxjava3.core.Single<JsonObject> queueDeclareAuto()
Actively declare a server-named exclusive, autodelete, non-durable queue.- Returns:
-
rxQueueDeclareAuto
public io.reactivex.rxjava3.core.Single<JsonObject> rxQueueDeclareAuto()
Actively declare a server-named exclusive, autodelete, non-durable queue.- Returns:
-
queueBind
public io.reactivex.rxjava3.core.Completable queueBind(String queue, String exchange, String routingKey)
Bind a queue to an exchange- Parameters:
queue
-exchange
-routingKey
-- Returns:
-
rxQueueBind
public io.reactivex.rxjava3.core.Completable rxQueueBind(String queue, String exchange, String routingKey)
Bind a queue to an exchange- Parameters:
queue
-exchange
-routingKey
-- Returns:
-
queueBind
public io.reactivex.rxjava3.core.Completable queueBind(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Bind a queue to an exchange- Parameters:
queue
-exchange
-routingKey
-arguments
-- Returns:
-
rxQueueBind
public io.reactivex.rxjava3.core.Completable rxQueueBind(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Bind a queue to an exchange- Parameters:
queue
-exchange
-routingKey
-arguments
-- Returns:
-
queueUnbind
public io.reactivex.rxjava3.core.Completable queueUnbind(String queue, String exchange, String routingKey)
Unbind a queue from an exchange- Parameters:
queue
-exchange
-routingKey
-- Returns:
-
rxQueueUnbind
public io.reactivex.rxjava3.core.Completable rxQueueUnbind(String queue, String exchange, String routingKey)
Unbind a queue from an exchange- Parameters:
queue
-exchange
-routingKey
-- Returns:
-
queueUnbind
public io.reactivex.rxjava3.core.Completable queueUnbind(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Unbind a queue from an exchange- Parameters:
queue
-exchange
-routingKey
-arguments
-- Returns:
-
rxQueueUnbind
public io.reactivex.rxjava3.core.Completable rxQueueUnbind(String queue, String exchange, String routingKey, Map<String,Object> arguments)
Unbind a queue from an exchange- Parameters:
queue
-exchange
-routingKey
-arguments
-- Returns:
-
messageCount
public io.reactivex.rxjava3.core.Single<Long> messageCount(String queue)
Returns the number of messages in a queue ready to be delivered.- Parameters:
queue
-- Returns:
-
rxMessageCount
public io.reactivex.rxjava3.core.Single<Long> rxMessageCount(String queue)
Returns the number of messages in a queue ready to be delivered.- Parameters:
queue
-- Returns:
-
start
public io.reactivex.rxjava3.core.Completable start()
Start the rabbitMQ client. Create the connection and the channel.- Returns:
-
rxStart
public io.reactivex.rxjava3.core.Completable rxStart()
Start the rabbitMQ client. Create the connection and the channel.- Returns:
-
stop
public io.reactivex.rxjava3.core.Completable stop()
Stop the rabbitMQ client. Close the connection and its channel.- Returns:
-
rxStop
public io.reactivex.rxjava3.core.Completable rxStop()
Stop the rabbitMQ client. Close the connection and its channel.- Returns:
-
isConnected
public boolean isConnected()
Check if a connection is open- Returns:
- true when the connection is open, false otherwise
-
restartConnect
public io.reactivex.rxjava3.core.Completable restartConnect(int attempts)
restart the rabbitMQ connect.- Parameters:
attempts
- number of attempts- Returns:
-
rxRestartConnect
public io.reactivex.rxjava3.core.Completable rxRestartConnect(int attempts)
restart the rabbitMQ connect.- Parameters:
attempts
- number of attempts- Returns:
-
isOpenChannel
public boolean isOpenChannel()
Check if a channel is open- Returns:
- true when the connection is open, false otherwise
-
basicPublish
public io.reactivex.rxjava3.core.Completable basicPublish(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body)
Publish a message. Publishing to a non-existent exchange will result in a channel-level protocol exception, which closes the channel. Invocations of Channel#basicPublish will eventually block if a resource-driven alarm is in effect.- Parameters:
exchange
-routingKey
-properties
-body
-- Returns:
-
rxBasicPublish
public io.reactivex.rxjava3.core.Completable rxBasicPublish(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body)
Publish a message. Publishing to a non-existent exchange will result in a channel-level protocol exception, which closes the channel. Invocations of Channel#basicPublish will eventually block if a resource-driven alarm is in effect.- Parameters:
exchange
-routingKey
-properties
-body
-- Returns:
-
basicPublishWithDeliveryTag
public io.reactivex.rxjava3.core.Completable basicPublishWithDeliveryTag(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body, Handler<Long> deliveryTagHandler)
Publish a message. Publishing to a non-existent exchange will result in a channel-level protocol exception, which closes the channel. Invocations of Channel#basicPublish will eventually block if a resource-driven alarm is in effect. The deliveryTagHandler will be called before the message is sent, which is necessary because the confirmation may arrive asynchronously before the resultHandler is called.- Parameters:
exchange
-routingKey
-properties
-body
-deliveryTagHandler
- callback to capture the deliveryTag for this message. Note that this will be called synchronously in the context of the client before the result is known.- Returns:
-
rxBasicPublishWithDeliveryTag
public io.reactivex.rxjava3.core.Completable rxBasicPublishWithDeliveryTag(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body, Handler<Long> deliveryTagHandler)
Publish a message. Publishing to a non-existent exchange will result in a channel-level protocol exception, which closes the channel. Invocations of Channel#basicPublish will eventually block if a resource-driven alarm is in effect. The deliveryTagHandler will be called before the message is sent, which is necessary because the confirmation may arrive asynchronously before the resultHandler is called.- Parameters:
exchange
-routingKey
-properties
-body
-deliveryTagHandler
- callback to capture the deliveryTag for this message. Note that this will be called synchronously in the context of the client before the result is known.- Returns:
-
queueDeclare
public io.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeclareOk> queueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete)
Declare a queue- Parameters:
queue
-durable
-exclusive
-autoDelete
-- Returns:
-
rxQueueDeclare
public io.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeclareOk> rxQueueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete)
Declare a queue- Parameters:
queue
-durable
-exclusive
-autoDelete
-- Returns:
-
queueDeclare
public io.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeclareOk> queueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete, JsonObject config)
Declare a queue with config options- Parameters:
queue
-durable
-exclusive
-autoDelete
-config
-- Returns:
-
rxQueueDeclare
public io.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeclareOk> rxQueueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete, JsonObject config)
Declare a queue with config options- Parameters:
queue
-durable
-exclusive
-autoDelete
-config
-- Returns:
-
queueDelete
public io.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeleteOk> queueDelete(String queue)
Delete a queue, without regard for whether it is in use or has messages on it- Parameters:
queue
-- Returns:
-
rxQueueDelete
public io.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeleteOk> rxQueueDelete(String queue)
Delete a queue, without regard for whether it is in use or has messages on it- Parameters:
queue
-- Returns:
-
queueDeleteIf
public io.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeleteOk> queueDeleteIf(String queue, boolean ifUnused, boolean ifEmpty)
Delete a queue- Parameters:
queue
-ifUnused
-ifEmpty
-- Returns:
-
rxQueueDeleteIf
public io.reactivex.rxjava3.core.Single<com.rabbitmq.client.AMQP.Queue.DeleteOk> rxQueueDeleteIf(String queue, boolean ifUnused, boolean ifEmpty)
Delete a queue- Parameters:
queue
-ifUnused
-ifEmpty
-- Returns:
-
newInstance
public static RabbitMQClient newInstance(RabbitMQClient arg)
-
-