RabbitMQClient

package

Default

Methods

__construct

__construct() 

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.

basicAck( $arg0,  $arg1,  $arg2) : void

Arguments

$arg0

integer

$arg1

boolean

$arg2

callable

Instead of using this and @see \io\vertx\jphp\rabbitmq\RabbitMQClient::basicConsume method,

basicCancel( $arg0,  $arg1 = null) : void
see \io\vertx\jphp\rabbitmq\RabbitMQClient::basicConsumer

and @see \io\vertx\jphp\rabbitmq\RabbitMQConsumer::cancel instead

This method should be called when you want to cancel consumption from a queue, started by calling @see \io\vertx\jphp\rabbitmq\RabbitMQClient::basicConsume. param $consumerTag [string] this method is deprecated basicCancel($consumerTag) Instead of using this and @see \io\vertx\jphp\rabbitmq\RabbitMQClient::basicConsume method, \io\vertx\jphp\rabbitmq\RabbitMQClient::basicConsumer

and @see \io\vertx\jphp\rabbitmq\RabbitMQConsumer::cancel instead

This method should be called when you want to cancel consumption from a queue, started by calling @see \io\vertx\jphp\rabbitmq\RabbitMQClient::basicConsume. param $consumerTag [string] param $resultHandler [callable] this method is deprecated basicCancel($consumerTag, $resultHandler)

deprecated

Arguments

$arg0

string

$arg1

callable

Use @see \io\vertx\jphp\rabbitmq\RabbitMQClient::basicConsumer instead <p> Start a non-nolocal, non-exclusive consumer, with auto acknowledgement and a server-generated consumerTag.

basicConsume( $arg0,  $arg1,  $arg2,  $arg3 = null,  $arg4 = null) : void

param $queue [string] param $address [string] param $resultHandler [callable] this method is deprecated basicConsume($queue, $address, $resultHandler)

Use @see \io\vertx\jphp\rabbitmq\RabbitMQClient::basicConsumer instead

Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag. param $queue [string] param $address [string] param $autoAck [boolean] param $resultHandler [callable] this method is deprecated basicConsume($queue, $address, $autoAck, $resultHandler) Use @see \io\vertx\jphp\rabbitmq\RabbitMQClient::basicConsumer instead

Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag and error handler param $queue [string] param $address [string] param $autoAck [boolean] param $resultHandler [callable] param $errorHandler [callable] this method is deprecated basicConsume($queue, $address, $autoAck, $resultHandler, $errorHandler)

deprecated

Arguments

$arg0

string

$arg1

string

$arg2

callable | boolean

$arg3

callable

$arg4

callable

param $queue [string] param $resultHandler [callable] <b> basicConsumer($queue, $resultHandler) </b>

basicConsumer( $arg0,  $arg1,  $arg2 = null) : void

Create a consumer with the given options.

param $queue [string] the name of a queue param $options [QueueOptions | array] options for queue param $resultHandler [callable] 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 basicConsumer($queue, $options, $resultHandler)

Arguments

$arg0

string

$arg1

callable | array | QueueOptions

$arg2

callable

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

basicGet( $arg0,  $arg1,  $arg2) : void

Arguments

$arg0

string

$arg1

boolean

$arg2

callable

Reject one or several received messages.

basicNack( $arg0,  $arg1,  $arg2,  $arg3) : void

Arguments

$arg0

integer

$arg1

boolean

$arg2

boolean

$arg3

callable

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.

basicPublish( $arg0,  $arg1,  $arg2,  $arg3) : void

Arguments

$arg0

string

$arg1

string

$arg2

array

$arg3

callable

Request a specific prefetchCount "quality of service" settings for this channel.

basicQos( $arg0,  $arg1,  $arg2 = null,  $arg3 = null) : void

param $prefetchCount [integer] maximum number of messages that the server will deliver, 0 if unlimited param $resultHandler [callable] handler called when operation is done with a result of the operation basicQos($prefetchCount, $resultHandler)

Request a specific prefetchCount "quality of service" settings for this channel.

param $prefetchCount [integer] maximum number of messages that the server will deliver, 0 if unlimited param $global [boolean] true if the settings should be applied to the entire channel rather than each consumer param $resultHandler [callable] handler called when operation is done with a result of the operation basicQos($prefetchCount, $global, $resultHandler)

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.

param $prefetchSize [integer] maximum amount of content (measured in octets) that the server will deliver, 0 if unlimited param $prefetchCount [integer] maximum number of messages that the server will deliver, 0 if unlimited param $global [boolean] true if the settings should be applied to the entire channel rather than each consumer param $resultHandler [callable] handler called when operation is done with a result of the operation basicQos($prefetchSize, $prefetchCount, $global, $resultHandler)

Arguments

$arg0

integer

$arg1

callable | boolean | integer

$arg2

callable | boolean

$arg3

callable

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

confirmSelect( $arg0) : void

Arguments

$arg0

callable

Create and return a client configured with the default options.

create( $arg0,  $arg1 = null) : \io\vertx\jphp\rabbitmq\RabbitMQClient
static

param $vertx [Vertx] the vertx instance create($vertx)

Create and return a client.

param $vertx [Vertx] the vertx instance param $config [RabbitMQOptions | array] the client config create($vertx, $config)

Arguments

$arg0

Vertx

$arg1

RabbitMQOptions | array

Response

\io\vertx\jphp\rabbitmq\RabbitMQClient

the client

Bind an exchange to an exchange.

exchangeBind( $arg0,  $arg1,  $arg2,  $arg3) : void

Arguments

$arg0

string

$arg1

string

$arg2

string

$arg3

callable

Declare an exchange.

exchangeDeclare( $arg0,  $arg1,  $arg2,  $arg3,  $arg4,  $arg5 = null) : void

param $exchange [string] param $type [string] param $durable [boolean] param $autoDelete [boolean] param $resultHandler [callable] exchangeDeclare($exchange, $type, $durable, $autoDelete, $resultHandler)

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

param $exchange [string] param $type [string] param $durable [boolean] param $autoDelete [boolean] param $config [array] param $resultHandler [callable] exchangeDeclare($exchange, $type, $durable, $autoDelete, $config, $resultHandler)

Arguments

$arg0

string

$arg1

string

$arg2

boolean

$arg3

boolean

$arg4

callable | array

$arg5

callable

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

exchangeDelete( $arg0,  $arg1) : void

Arguments

$arg0

string

$arg1

callable

Unbind an exchange from an exchange.

exchangeUnbind( $arg0,  $arg1,  $arg2,  $arg3) : void

Arguments

$arg0

string

$arg1

string

$arg2

string

$arg3

callable

Check if a connection is open

isConnected() : boolean

Response

boolean

true when the connection is open, false otherwise

Check if a channel is open

isOpenChannel() : boolean

Response

boolean

true when the connection is open, false otherwise

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

messageCount( $arg0,  $arg1) : void

Arguments

$arg0

string

$arg1

callable

Bind a queue to an exchange

queueBind( $arg0,  $arg1,  $arg2,  $arg3) : void

Arguments

$arg0

string

$arg1

string

$arg2

string

$arg3

callable

Declare a queue

queueDeclare( $arg0,  $arg1,  $arg2,  $arg3,  $arg4,  $arg5 = null) : void

param $queue [string] param $durable [boolean] param $exclusive [boolean] param $autoDelete [boolean] param $resultHandler [callable] queueDeclare($queue, $durable, $exclusive, $autoDelete, $resultHandler)

Declare a queue with config options

param $queue [string] param $durable [boolean] param $exclusive [boolean] param $autoDelete [boolean] param $config [array] param $resultHandler [callable] queueDeclare($queue, $durable, $exclusive, $autoDelete, $config, $resultHandler)

Arguments

$arg0

string

$arg1

boolean

$arg2

boolean

$arg3

boolean

$arg4

callable | array

$arg5

callable

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

queueDeclareAuto( $arg0) : void

Arguments

$arg0

callable

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

queueDelete( $arg0,  $arg1) : void

Arguments

$arg0

string

$arg1

callable

Delete a queue

queueDeleteIf( $arg0,  $arg1,  $arg2,  $arg3) : void

Arguments

$arg0

string

$arg1

boolean

$arg2

boolean

$arg3

callable

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

start( $arg0) : void

Arguments

$arg0

callable

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

stop( $arg0) : void

Arguments

$arg0

callable

Wait until all messages published since the last call have been either ack'd or nack'd by the broker.

waitForConfirms( $arg0,  $arg1 = null) : void

This will incur slight performance loss at the expense of higher write consistency. If desired, multiple calls to basicPublish() can be batched before confirming.

param $resultHandler [callable] waitForConfirms($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. If the timeout expires a TimeoutException is thrown.

param $timeout [integer] param $resultHandler [callable] waitForConfirms($timeout, $resultHandler)

Arguments

$arg0

callable | integer

$arg1

callable