public interface RabbitMQClient
Modifier and Type | Method and Description |
---|---|
void |
basicAck(long deliveryTag,
boolean multiple,
Handler<AsyncResult<JsonObject>> resultHandler)
Acknowledge one or several received messages.
|
void |
basicCancel(String consumerTag)
Deprecated.
|
void |
basicCancel(String consumerTag,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
void |
basicConsume(String queue,
String address,
boolean autoAck,
Handler<AsyncResult<String>> resultHandler)
Deprecated.
|
void |
basicConsume(String queue,
String address,
boolean autoAck,
Handler<AsyncResult<String>> resultHandler,
Handler<Throwable> errorHandler)
Deprecated.
|
void |
basicConsume(String queue,
String address,
Handler<AsyncResult<String>> resultHandler)
Deprecated.
|
default void |
basicConsumer(String queue,
Handler<AsyncResult<RabbitMQConsumer>> resultHandler) |
void |
basicConsumer(String queue,
QueueOptions options,
Handler<AsyncResult<RabbitMQConsumer>> resultHandler)
Create a consumer with the given
options . |
void |
basicGet(String queue,
boolean autoAck,
Handler<AsyncResult<JsonObject>> resultHandler)
Retrieve a message from a queue using AMQP.Basic.Get
|
void |
basicNack(long deliveryTag,
boolean multiple,
boolean requeue,
Handler<AsyncResult<JsonObject>> resultHandler)
Reject one or several received messages.
|
void |
basicPublish(String exchange,
String routingKey,
JsonObject message,
Handler<AsyncResult<Void>> resultHandler)
Publish a message.
|
default void |
basicQos(int prefetchCount,
boolean global,
Handler<AsyncResult<Void>> resultHandler)
Request a specific prefetchCount "quality of service" settings
for this channel.
|
default void |
basicQos(int prefetchCount,
Handler<AsyncResult<Void>> resultHandler)
Request a specific prefetchCount "quality of service" settings
for this channel.
|
void |
basicQos(int prefetchSize,
int prefetchCount,
boolean global,
Handler<AsyncResult<Void>> resultHandler)
Request specific "quality of service" settings.
|
void |
confirmSelect(Handler<AsyncResult<Void>> resultHandler)
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,
JsonObject config)
Like
create(Vertx, RabbitMQOptions) but with a JsonObject config object. |
static RabbitMQClient |
create(Vertx vertx,
RabbitMQOptions config)
Create and return a client.
|
void |
exchangeBind(String destination,
String source,
String routingKey,
Handler<AsyncResult<Void>> resultHandler)
Bind an exchange to an exchange.
|
void |
exchangeBind(String destination,
String source,
String routingKey,
Map<String,Object> arguments,
Handler<AsyncResult<Void>> resultHandler)
Bind an exchange to an exchange.
|
void |
exchangeDeclare(String exchange,
String type,
boolean durable,
boolean autoDelete,
Handler<AsyncResult<Void>> resultHandler)
Declare an exchange.
|
void |
exchangeDeclare(String exchange,
String type,
boolean durable,
boolean autoDelete,
JsonObject config,
Handler<AsyncResult<Void>> resultHandler)
Declare an exchange with additional parameters such as dead lettering, an alternate exchange or TTL.
|
void |
exchangeDeclare(String exchange,
String type,
boolean durable,
boolean autoDelete,
Map<String,String> config,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
Use
exchangeDeclare(String, String, boolean, boolean, JsonObject, Handler) instead for
support for more than just String config values |
void |
exchangeDelete(String exchange,
Handler<AsyncResult<Void>> resultHandler)
Delete an exchange, without regard for whether it is in use or not.
|
void |
exchangeUnbind(String destination,
String source,
String routingKey,
Handler<AsyncResult<Void>> resultHandler)
Unbind an exchange from an exchange.
|
void |
exchangeUnbind(String destination,
String source,
String routingKey,
Map<String,Object> arguments,
Handler<AsyncResult<Void>> resultHandler)
Unbind an exchange from an exchange.
|
boolean |
isConnected()
Check if a connection is open
|
boolean |
isOpenChannel()
Check if a channel is open
|
void |
messageCount(String queue,
Handler<AsyncResult<Long>> resultHandler)
Returns the number of messages in a queue ready to be delivered.
|
void |
queueBind(String queue,
String exchange,
String routingKey,
Handler<AsyncResult<Void>> resultHandler)
Bind a queue to an exchange
|
void |
queueBind(String queue,
String exchange,
String routingKey,
Map<String,Object> arguments,
Handler<AsyncResult<Void>> resultHandler)
Bind a queue to an exchange
|
void |
queueDeclare(String queue,
boolean durable,
boolean exclusive,
boolean autoDelete,
Handler<AsyncResult<JsonObject>> resultHandler)
Declare a queue
|
void |
queueDeclare(String queue,
boolean durable,
boolean exclusive,
boolean autoDelete,
JsonObject config,
Handler<AsyncResult<JsonObject>> resultHandler)
Declare a queue with config options
|
void |
queueDeclare(String queue,
boolean durable,
boolean exclusive,
boolean autoDelete,
Map<String,String> config,
Handler<AsyncResult<JsonObject>> resultHandler)
Deprecated.
See
queueDeclare(String, boolean, boolean, boolean, JsonObject, Handler) instead for
support for more than just String config values |
void |
queueDeclareAuto(Handler<AsyncResult<JsonObject>> resultHandler)
Actively declare a server-named exclusive, autodelete, non-durable queue.
|
void |
queueDelete(String queue,
Handler<AsyncResult<JsonObject>> resultHandler)
Delete a queue, without regard for whether it is in use or has messages on it
|
void |
queueDeleteIf(String queue,
boolean ifUnused,
boolean ifEmpty,
Handler<AsyncResult<JsonObject>> resultHandler)
Delete a queue
|
void |
queueUnbind(String queue,
String exchange,
String routingKey,
Handler<AsyncResult<Void>> resultHandler)
Unbind a queue from an exchange
|
void |
queueUnbind(String queue,
String exchange,
String routingKey,
Map<String,Object> arguments,
Handler<AsyncResult<Void>> resultHandler)
Unbind a queue from an exchange
|
void |
start(Handler<AsyncResult<Void>> resultHandler)
Start the rabbitMQ client.
|
void |
stop(Handler<AsyncResult<Void>> resultHandler)
Stop the rabbitMQ client.
|
void |
waitForConfirms(Handler<AsyncResult<Void>> resultHandler)
Wait until all messages published since the last call have been either ack'd or nack'd by the broker.
|
void |
waitForConfirms(long timeout,
Handler<AsyncResult<Void>> resultHandler)
Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses.
|
static RabbitMQClient create(Vertx vertx)
vertx
- the vertx instancestatic RabbitMQClient create(Vertx vertx, RabbitMQOptions config)
vertx
- the vertx instanceconfig
- the client configstatic RabbitMQClient create(Vertx vertx, JsonObject config)
create(Vertx, RabbitMQOptions)
but with a JsonObject
config object.void basicAck(long deliveryTag, boolean multiple, Handler<AsyncResult<JsonObject>> resultHandler)
Channel.basicAck(long, boolean)
void basicNack(long deliveryTag, boolean multiple, boolean requeue, Handler<AsyncResult<JsonObject>> resultHandler)
Channel.basicNack(long, boolean, boolean)
void basicGet(String queue, boolean autoAck, Handler<AsyncResult<JsonObject>> resultHandler)
Channel.basicGet(String, boolean)
@Deprecated void basicConsume(String queue, String address, Handler<AsyncResult<String>> resultHandler)
basicConsumer(String, QueueOptions, Handler)
instead
Start a non-nolocal, non-exclusive consumer, with auto acknowledgement and a server-generated consumerTag.
Channel.basicConsume(String, Consumer)
@Deprecated void basicConsume(String queue, String address, boolean autoAck, Handler<AsyncResult<String>> resultHandler)
basicConsumer(String, QueueOptions, Handler)
instead
Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag.
Channel.basicConsume(String, boolean, String, Consumer)
@Deprecated void basicConsume(String queue, String address, boolean autoAck, Handler<AsyncResult<String>> resultHandler, Handler<Throwable> errorHandler)
basicConsumer(String, QueueOptions, Handler)
instead
Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag and error handler
Channel.basicConsume(String, boolean, String, Consumer)
@Deprecated void basicCancel(String consumerTag)
basicConsume(String, String, Handler)
method,
basicConsumer(String, QueueOptions, Handler)
and RabbitMQConsumer.cancel(Handler)
instead
This method should be called when you want to cancel consumption from a queue,
started by calling basicConsume(String, String, Handler)
.
Channel.basicCancel(String)
@Deprecated void basicCancel(String consumerTag, Handler<AsyncResult<Void>> resultHandler)
basicConsume(String, String, Handler)
method,
basicConsumer(String, QueueOptions, Handler)
and RabbitMQConsumer.cancel(Handler)
instead
This method should be called when you want to cancel consumption from a queue,
started by calling basicConsume(String, String, Handler)
.
Channel.basicCancel(String)
default void basicConsumer(String queue, Handler<AsyncResult<RabbitMQConsumer>> resultHandler)
Channel.basicConsume(String, Consumer)
,
basicConsumer(String, Handler)
void basicConsumer(String queue, QueueOptions options, Handler<AsyncResult<RabbitMQConsumer>> resultHandler)
options
.queue
- the name of a queueoptions
- options for queueresultHandler
- a handler through which you can find out the operation status;
if the operation succeeds you can begin to receive messages
through an instance of RabbitMQConsumer
Channel.basicConsume(String, boolean, String, Consumer)
void basicPublish(String exchange, String routingKey, JsonObject message, Handler<AsyncResult<Void>> resultHandler)
Channel.basicPublish(String, String, AMQP.BasicProperties, byte[])
void confirmSelect(Handler<AsyncResult<Void>> resultHandler)
Channel.confirmSelect()
,
http://www.rabbitmq.com/confirms.html
void waitForConfirms(Handler<AsyncResult<Void>> resultHandler)
IOException
- Throws an IOException if the message was not written to the queue.Channel.waitForConfirms()
,
http://www.rabbitmq.com/confirms.html
void waitForConfirms(long timeout, Handler<AsyncResult<Void>> resultHandler)
timeout
- IOException
- Throws an IOException if the message was not written to the queue.RabbitMQClientImpl.waitForConfirms(Handler)
,
http://www.rabbitmq.com/confirms.html
default void basicQos(int prefetchCount, Handler<AsyncResult<Void>> resultHandler)
prefetchCount
- maximum number of messages that the server
will deliver, 0 if unlimitedresultHandler
- handler called when operation is done with a result of the operationbasicQos(int, int, boolean, Handler)
default void basicQos(int prefetchCount, boolean global, Handler<AsyncResult<Void>> resultHandler)
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 consumerresultHandler
- handler called when operation is done with a result of the operationbasicQos(int, int, boolean, Handler)
void basicQos(int prefetchSize, int prefetchCount, boolean global, Handler<AsyncResult<Void>> resultHandler)
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 consumerresultHandler
- handler called when operation is done with a result of the operationAMQP.Basic.Qos
void exchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, Handler<AsyncResult<Void>> resultHandler)
Channel.exchangeDeclare(String, String, boolean, boolean, Map)
@Deprecated void exchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, Map<String,String> config, Handler<AsyncResult<Void>> resultHandler)
exchangeDeclare(String, String, boolean, boolean, JsonObject, Handler)
instead for
support for more than just String config valuesChannel.exchangeDeclare(String, String, boolean, boolean, Map)
,
exchangeDeclare(String, String, boolean, boolean, JsonObject, Handler)
void exchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, JsonObject config, Handler<AsyncResult<Void>> resultHandler)
Channel.exchangeDeclare(String, String, boolean, boolean, Map)
void exchangeDelete(String exchange, Handler<AsyncResult<Void>> resultHandler)
Channel.exchangeDelete(String)
void exchangeBind(String destination, String source, String routingKey, Handler<AsyncResult<Void>> resultHandler)
Channel.exchangeBind(String, String, String)
void exchangeBind(String destination, String source, String routingKey, Map<String,Object> arguments, Handler<AsyncResult<Void>> resultHandler)
com.rabbitmq.client.Channel#exchangeBind(String, String, String, Map)
void exchangeUnbind(String destination, String source, String routingKey, Handler<AsyncResult<Void>> resultHandler)
Channel.exchangeUnbind(String, String, String)
void exchangeUnbind(String destination, String source, String routingKey, Map<String,Object> arguments, Handler<AsyncResult<Void>> resultHandler)
com.rabbitmq.client.Channel#exchangeUnbind(String, String, String, Map)
void queueDeclareAuto(Handler<AsyncResult<JsonObject>> resultHandler)
Channel.queueDeclare()
void queueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete, Handler<AsyncResult<JsonObject>> resultHandler)
Channel.queueDeclare(String, boolean, boolean, boolean, java.util.Map)
@Deprecated void queueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete, Map<String,String> config, Handler<AsyncResult<JsonObject>> resultHandler)
queueDeclare(String, boolean, boolean, boolean, JsonObject, Handler)
instead for
support for more than just String config valuesChannel.queueDeclare(String, boolean, boolean, boolean, java.util.Map)
,
queueDeclare(String, boolean, boolean, boolean, JsonObject, Handler)
void queueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete, JsonObject config, Handler<AsyncResult<JsonObject>> resultHandler)
Channel.queueDeclare(String, boolean, boolean, boolean, java.util.Map)
void queueDelete(String queue, Handler<AsyncResult<JsonObject>> resultHandler)
Channel.queueDelete(String)
void queueDeleteIf(String queue, boolean ifUnused, boolean ifEmpty, Handler<AsyncResult<JsonObject>> resultHandler)
Channel.queueDelete(String, boolean, boolean)
void queueBind(String queue, String exchange, String routingKey, Handler<AsyncResult<Void>> resultHandler)
Channel.queueBind(String, String, String)
void queueBind(String queue, String exchange, String routingKey, Map<String,Object> arguments, Handler<AsyncResult<Void>> resultHandler)
com.rabbitmq.client.Channel#queueBind(String, String, String, Map)
void queueUnbind(String queue, String exchange, String routingKey, Handler<AsyncResult<Void>> resultHandler)
Channel.queueUnbind(String, String, String)
void queueUnbind(String queue, String exchange, String routingKey, Map<String,Object> arguments, Handler<AsyncResult<Void>> resultHandler)
com.rabbitmq.client.Channel#queueUnbind(String, String, String, Map)
void messageCount(String queue, Handler<AsyncResult<Long>> resultHandler)
Channel.messageCount(String)
void start(Handler<AsyncResult<Void>> resultHandler)
Connection.createChannel()
void stop(Handler<AsyncResult<Void>> resultHandler)
Connection.close()
boolean isConnected()
ShutdownNotifier.isOpen()
boolean isOpenChannel()
ShutdownNotifier.isOpen()
Copyright © 2023 Eclipse. All rights reserved.