interface RabbitMQClient
Author
Nick Scavelli
abstract fun basicAck(deliveryTag: Long, multiple: Boolean, resultHandler: Handler<AsyncResult<JsonObject>>): Unit
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. |
|
abstract fun basicConsume(queue: String, address: String, resultHandler: Handler<AsyncResult<Void>>): Unit
Start a non-nolocal, non-exclusive consumer, with auto acknowledgement and a server-generated consumerTag. abstract fun basicConsume(queue: String, address: String, autoAck: Boolean, resultHandler: Handler<AsyncResult<Void>>): Unit
Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag. abstract fun basicConsume(queue: String, address: String, autoAck: Boolean, resultHandler: Handler<AsyncResult<Void>>, errorHandler: Handler<Throwable>): Unit
Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag and error handler |
|
abstract fun basicGet(queue: String, autoAck: Boolean, resultHandler: Handler<AsyncResult<JsonObject>>): Unit
Retrieve a message from a queue using AMQP.Basic.Get |
|
abstract fun basicNack(deliveryTag: Long, multiple: Boolean, requeue: Boolean, resultHandler: Handler<AsyncResult<JsonObject>>): Unit
Reject one or several received messages. |
|
abstract fun basicPublish(exchange: String, routingKey: String, message: JsonObject, resultHandler: Handler<AsyncResult<Void>>): Unit
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. |
|
abstract fun basicQos(prefetchCount: Int, resultHandler: Handler<AsyncResult<Void>>): Unit
Request specific "quality of service" settings, Limiting the number of unacknowledged messages on a channel (or connection). This limit is applied separately to each new consumer on the channel. |
|
abstract fun confirmSelect(resultHandler: Handler<AsyncResult<Void>>): Unit
Enables publisher acknowledgements on this channel. Can be called once during client initialisation. Calls to basicPublish() will have to be confirmed. |
|
open static fun create(vertx: Vertx, config: RabbitMQOptions): RabbitMQClient
Create and return a client. open static fun create(vertx: Vertx, config: JsonObject): RabbitMQClient
Like |
|
abstract fun exchangeBind(destination: String, source: String, routingKey: String, resultHandler: Handler<AsyncResult<Void>>): Unit
Bind an exchange to an exchange. |
|
abstract fun exchangeDeclare(exchange: String, type: String, durable: Boolean, autoDelete: Boolean, resultHandler: Handler<AsyncResult<Void>>): Unit
Declare an exchange. abstract fun exchangeDeclare(exchange: String, type: String, durable: Boolean, autoDelete: Boolean, config: MutableMap<String, String>, resultHandler: Handler<AsyncResult<Void>>): Unit
Declare an exchange with additional parameters such as dead lettering or an alternate exchnage. |
|
abstract fun exchangeDelete(exchange: String, resultHandler: Handler<AsyncResult<Void>>): Unit
Delete an exchange, without regard for whether it is in use or not. |
|
abstract fun exchangeUnbind(destination: String, source: String, routingKey: String, resultHandler: Handler<AsyncResult<Void>>): Unit
Unbind an exchange from an exchange. |
|
abstract fun isConnected(): Boolean
Check if a connection is open |
|
abstract fun isOpenChannel(): Boolean
Check if a channel is open |
|
abstract fun messageCount(queue: String, resultHandler: Handler<AsyncResult<JsonObject>>): Unit
Returns the number of messages in a queue ready to be delivered. |
|
abstract fun queueBind(queue: String, exchange: String, routingKey: String, resultHandler: Handler<AsyncResult<Void>>): Unit
Bind a queue to an exchange |
|
abstract fun queueDeclare(queue: String, durable: Boolean, exclusive: Boolean, autoDelete: Boolean, resultHandler: Handler<AsyncResult<JsonObject>>): Unit
Declare a queue abstract fun queueDeclare(queue: String, durable: Boolean, exclusive: Boolean, autoDelete: Boolean, config: MutableMap<String, String>, resultHandler: Handler<AsyncResult<JsonObject>>): Unit
Declare a queue with config options |
|
abstract fun queueDeclareAuto(resultHandler: Handler<AsyncResult<JsonObject>>): Unit
Actively declare a server-named exclusive, autodelete, non-durable queue. |
|
abstract fun queueDelete(queue: String, resultHandler: Handler<AsyncResult<JsonObject>>): Unit
Delete a queue, without regard for whether it is in use or has messages on it |
|
abstract fun queueDeleteIf(queue: String, ifUnused: Boolean, ifEmpty: Boolean, resultHandler: Handler<AsyncResult<JsonObject>>): Unit
Delete a queue |
|
abstract fun start(resultHandler: Handler<AsyncResult<Void>>): Unit
Start the rabbitMQ client. Create the connection and the chanel. |
|
abstract fun stop(resultHandler: Handler<AsyncResult<Void>>): Unit
Stop the rabbitMQ client. Close the connection and its chanel. |
|
abstract fun waitForConfirms(resultHandler: Handler<AsyncResult<Void>>): Unit
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. abstract fun waitForConfirms(timeout: Long, resultHandler: Handler<AsyncResult<Void>>): Unit
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. |