vertx / io.vertx.rxjava.rabbitmq / RabbitMQClient

RabbitMQClient

open class RabbitMQClient

NOTE: This class has been automatically generated from the io.vertx.rabbitmq.RabbitMQClient non RX-ified interface using Vert.x codegen.

Constructors

<init>

RabbitMQClient(delegate: RabbitMQClient)

Properties

__TYPE_ARG

static val __TYPE_ARG: TypeArg<RabbitMQClient>

Functions

basicAck

open 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.

basicConsume

open 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.

open 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.

open 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

basicGet

open fun basicGet(queue: String, autoAck: Boolean, resultHandler: Handler<AsyncResult<JsonObject>>): Unit

Retrieve a message from a queue using AMQP.Basic.Get

basicNack

open fun basicNack(deliveryTag: Long, multiple: Boolean, requeue: Boolean, resultHandler: Handler<AsyncResult<JsonObject>>): Unit

Reject one or several received messages.

basicPublish

open 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.

basicQos

open 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.

confirmSelect

open 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.

create

open static fun create(vertx: Vertx, config: RabbitMQOptions): RabbitMQClient

Create and return a client.

equals

open fun equals(other: Any?): Boolean

exchangeBind

open fun exchangeBind(destination: String, source: String, routingKey: String, resultHandler: Handler<AsyncResult<Void>>): Unit

Bind an exchange to an exchange.

exchangeDeclare

open fun exchangeDeclare(exchange: String, type: String, durable: Boolean, autoDelete: Boolean, resultHandler: Handler<AsyncResult<Void>>): Unit

Declare an exchange.

open 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.

exchangeDelete

open fun exchangeDelete(exchange: String, resultHandler: Handler<AsyncResult<Void>>): Unit

Delete an exchange, without regard for whether it is in use or not.

exchangeUnbind

open fun exchangeUnbind(destination: String, source: String, routingKey: String, resultHandler: Handler<AsyncResult<Void>>): Unit

Unbind an exchange from an exchange.

getDelegate

open fun getDelegate(): RabbitMQClient

hashCode

open fun hashCode(): Int

isConnected

open fun isConnected(): Boolean

Check if a connection is open

isOpenChannel

open fun isOpenChannel(): Boolean

Check if a channel is open

messageCount

open fun messageCount(queue: String, resultHandler: Handler<AsyncResult<JsonObject>>): Unit

Returns the number of messages in a queue ready to be delivered.

newInstance

open static fun newInstance(arg: RabbitMQClient): RabbitMQClient

queueBind

open fun queueBind(queue: String, exchange: String, routingKey: String, resultHandler: Handler<AsyncResult<Void>>): Unit

Bind a queue to an exchange

queueDeclare

open fun queueDeclare(queue: String, durable: Boolean, exclusive: Boolean, autoDelete: Boolean, resultHandler: Handler<AsyncResult<JsonObject>>): Unit

Declare a queue

open 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

queueDeclareAuto

open fun queueDeclareAuto(resultHandler: Handler<AsyncResult<JsonObject>>): Unit

Actively declare a server-named exclusive, autodelete, non-durable queue.

queueDelete

open 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

queueDeleteIf

open fun queueDeleteIf(queue: String, ifUnused: Boolean, ifEmpty: Boolean, resultHandler: Handler<AsyncResult<JsonObject>>): Unit

Delete a queue

rxBasicAck

open fun rxBasicAck(deliveryTag: Long, multiple: Boolean): Single<JsonObject>

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.

rxBasicConsume

open fun rxBasicConsume(queue: String, address: String): Single<Void>

Start a non-nolocal, non-exclusive consumer, with auto acknowledgement and a server-generated consumerTag.

open fun rxBasicConsume(queue: String, address: String, autoAck: Boolean): Single<Void>

Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag.

rxBasicGet

open fun rxBasicGet(queue: String, autoAck: Boolean): Single<JsonObject>

Retrieve a message from a queue using AMQP.Basic.Get

rxBasicNack

open fun rxBasicNack(deliveryTag: Long, multiple: Boolean, requeue: Boolean): Single<JsonObject>

Reject one or several received messages.

rxBasicPublish

open fun rxBasicPublish(exchange: String, routingKey: String, message: JsonObject): Single<Void>

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.

rxBasicQos

open fun rxBasicQos(prefetchCount: Int): Single<Void>

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.

rxConfirmSelect

open fun rxConfirmSelect(): Single<Void>

Enables publisher acknowledgements on this channel. Can be called once during client initialisation. Calls to basicPublish() will have to be confirmed.

rxExchangeBind

open fun rxExchangeBind(destination: String, source: String, routingKey: String): Single<Void>

Bind an exchange to an exchange.

rxExchangeDeclare

open fun rxExchangeDeclare(exchange: String, type: String, durable: Boolean, autoDelete: Boolean): Single<Void>

Declare an exchange.

open fun rxExchangeDeclare(exchange: String, type: String, durable: Boolean, autoDelete: Boolean, config: MutableMap<String, String>): Single<Void>

Declare an exchange with additional parameters such as dead lettering or an alternate exchnage.

rxExchangeDelete

open fun rxExchangeDelete(exchange: String): Single<Void>

Delete an exchange, without regard for whether it is in use or not.

rxExchangeUnbind

open fun rxExchangeUnbind(destination: String, source: String, routingKey: String): Single<Void>

Unbind an exchange from an exchange.

rxMessageCount

open fun rxMessageCount(queue: String): Single<JsonObject>

Returns the number of messages in a queue ready to be delivered.

rxQueueBind

open fun rxQueueBind(queue: String, exchange: String, routingKey: String): Single<Void>

Bind a queue to an exchange

rxQueueDeclare

open fun rxQueueDeclare(queue: String, durable: Boolean, exclusive: Boolean, autoDelete: Boolean): Single<JsonObject>

Declare a queue

open fun rxQueueDeclare(queue: String, durable: Boolean, exclusive: Boolean, autoDelete: Boolean, config: MutableMap<String, String>): Single<JsonObject>

Declare a queue with config options

rxQueueDeclareAuto

open fun rxQueueDeclareAuto(): Single<JsonObject>

Actively declare a server-named exclusive, autodelete, non-durable queue.

rxQueueDelete

open fun rxQueueDelete(queue: String): Single<JsonObject>

Delete a queue, without regard for whether it is in use or has messages on it

rxQueueDeleteIf

open fun rxQueueDeleteIf(queue: String, ifUnused: Boolean, ifEmpty: Boolean): Single<JsonObject>

Delete a queue

rxStart

open fun rxStart(): Single<Void>

Start the rabbitMQ client. Create the connection and the chanel.

rxStop

open fun rxStop(): Single<Void>

Stop the rabbitMQ client. Close the connection and its chanel.

rxWaitForConfirms

open fun rxWaitForConfirms(): Single<Void>

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.

open fun rxWaitForConfirms(timeout: Long): Single<Void>

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.

start

open fun start(resultHandler: Handler<AsyncResult<Void>>): Unit

Start the rabbitMQ client. Create the connection and the chanel.

stop

open fun stop(resultHandler: Handler<AsyncResult<Void>>): Unit

Stop the rabbitMQ client. Close the connection and its chanel.

toString

open fun toString(): String

waitForConfirms

open 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.

open 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.