public interface RabbitMQPublisher
Modifier and Type | Method and Description |
---|---|
static RabbitMQPublisher |
create(Vertx vertx,
RabbitMQClient client,
RabbitMQPublisherOptions options)
Create and return a publisher using the specified client.
|
ReadStream<RabbitMQPublisherConfirmation> |
getConfirmationStream()
Get the ReadStream that contains the message IDs for confirmed messages.
|
Future<Void> |
publish(String exchange,
String routingKey,
com.rabbitmq.client.BasicProperties properties,
Buffer body)
Like
#basicPublish(String, String, BasicProperties, Buffer, Handler) but returns a Future of the asynchronous result |
void |
publish(String exchange,
String routingKey,
com.rabbitmq.client.BasicProperties properties,
Buffer body,
Handler<AsyncResult<Void>> resultHandler)
Publish a message.
|
Future<Long> |
publishConfirm(String exchange,
String routingKey,
com.rabbitmq.client.BasicProperties properties,
Buffer body)
Publish a message and complete when publish confirm has returned.
|
void |
publishConfirm(String exchange,
String routingKey,
com.rabbitmq.client.BasicProperties properties,
Buffer body,
Handler<AsyncResult<Long>> resultHandler)
Publish a message and complete when publish confirm has returned.
|
int |
queueSize()
Get the number of published, but not sent, messages.
|
void |
restart()
Undo the effects of calling
stop(Handler) so that publish may be called again. |
Future<Void> |
start()
Like
start(Handler) but returns a Future of the asynchronous result |
void |
start(Handler<AsyncResult<Void>> resultHandler)
Start the rabbitMQ publisher.
|
Future<Void> |
stop()
Like
stop(Handler) but returns a Future of the asynchronous result |
void |
stop(Handler<AsyncResult<Void>> resultHandler)
Stop the rabbitMQ publisher.
|
static RabbitMQPublisher create(Vertx vertx, RabbitMQClient client, RabbitMQPublisherOptions options)
vertx
- the vertx instance.client
- the RabbitMQClient.options
- options for the publisher.void start(Handler<AsyncResult<Void>> resultHandler)
Future<Void> start()
start(Handler)
but returns a Future
of the asynchronous resultvoid stop(Handler<AsyncResult<Void>> resultHandler)
Future<Void> stop()
stop(Handler)
but returns a Future
of the asynchronous resultvoid restart()
stop(Handler)
so that publish may be called again.
It is harmless to call restart() when stop(Handler)
has not been called, however if restart() is called
whilst stop(Handler)
is being processed the stop(Handler)
will never complete.ReadStream<RabbitMQPublisherConfirmation> getConfirmationStream()
void publish(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body, Handler<AsyncResult<Void>> resultHandler)
Channel.basicPublish(String, String, AMQP.BasicProperties, byte[])
Future<Void> publish(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body)
#basicPublish(String, String, BasicProperties, Buffer, Handler)
but returns a Future
of the asynchronous resultvoid publishConfirm(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body, Handler<AsyncResult<Long>> resultHandler)
Channel.basicPublish(String, String, AMQP.BasicProperties, byte[])
Future<Long> publishConfirm(String exchange, String routingKey, com.rabbitmq.client.BasicProperties properties, Buffer body)
Channel.basicPublish(String, String, AMQP.BasicProperties, byte[])
int queueSize()
Copyright © 2024 Eclipse. All rights reserved.