MAKS\AmqpAgent\Worker\ConsumerInterface
An interface defining the basic methods of a consumer.
- // methods
- public static void ack()
- public static void nack()
- public static ?AMQPMessage get()
- public static mixed cancel()
- public static mixed recover()
- public static void reject()
- public ConsumerInterface qos()
- public ConsumerInterface consume()
- public bool isConsuming()
- public ConsumerInterface wait()
- public ConsumerInterface waitForAll()
- // Inherited methods from AbstractWorkerInterface
- public static bool shutdown()
- public static AMQPTable arguments()
- public AbstractWorkerInterface connect()
- public AbstractWorkerInterface disconnect()
- public AbstractWorkerInterface reconnect()
- public AbstractWorkerInterface queue()
- public AMQPStreamConnection|null getConnection()
- public AbstractWorkerInterface setConnection()
- public AMQPStreamConnection getNewConnection()
- public AMQPChannel|null getChannel()
- public AbstractWorkerInterface setChannel()
- public AMQPChannel|null getNewChannel()
- public AMQPChannel|null getChannelById()
- ack() — Acknowledges an AMQP message object.
- cancel() — Ends a queue consumer.
- consume() — Consumes messages from the default channel of the worker's connection to RabbitMQ server.
- get() — Gets a message object from a channel, direct access to a queue.
- isConsuming() — Checks whether the default channel is consuming.
- nack() — Unacknowledges an AMQP message object.
- qos() — Specifies the quality of service on the default channel of the worker's connection to RabbitMQ server.
- recover() — Redelivers unacknowledged messages
- reject() — Rejects an AMQP message object.
- wait() — Keeps the connection to RabbitMQ server alive as long as the default channel is in used.
- waitForAll() — Tries to keep the connection to RabbitMQ server alive as long as there are channels in used (default or not).
- arguments() — Returns an AMQPTable object.
- connect() — Establishes a connection with RabbitMQ server and opens a channel for the worker in the opened connection, it also sets both of them as defaults.
- disconnect() — Closes all open channels and connections with RabbitMQ server.
- getChannel() — Returns the default channel of the worker. If the worker is not connected, it returns null.
- getChannelById() — Fetches a channel object identified by the passed id (channel_id). If not found, it returns null.
- getConnection() — Returns the default connection of the worker. If the worker is not connected, it returns null.
- getNewChannel() — Returns a new channel on the the passed connection of the worker. If no connection is passed, it uses the default connection. If the worker is not connected, it returns null.
- getNewConnection() — Opens a new connection to RabbitMQ server and returns it. Connections returned by this method pushed to connections array and are not set as default automatically.
- queue() — Declares a queue on the default channel of the worker's connection with RabbitMQ server.
- reconnect() — Executes `self::disconnect()` and `self::connect()` respectively. Note that this method will not restore old channels.
- setChannel() — Sets the passed channel as the default channel of the worker.
- setConnection() — Sets the passed connection as the default connection of the worker.
- shutdown() — Closes the connection or the channel or both with RabbitMQ server.
Synopsis
interface ConsumerInterface
extends AbstractWorkerInterface
{