MAKS\AmqpAgent\Worker\PublisherInterface
An interface defining the basic methods of a publisher.
Synopsis
interface PublisherInterface
extends AbstractWorkerInterface
{
- // methods
- public PublisherInterface exchange()
- public PublisherInterface bind()
- public AMQPMessage message()
- public PublisherInterface publish()
- public PublisherInterface publishBatch()
- // 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()
Hierarchy
Methods
public
- bind() — Binds the default queue to the default exchange on the default channel of the worker's connection to RabbitMQ server.
- exchange() — Declares an exchange on the default channel of the worker's connection to RabbitMQ server.
- message() — Returns an AMQPMessage object.
- publish() — Publishes a message to the default exchange on the default channel of the worker's connection to RabbitMQ server.
- publishBatch() — Publishes a batch of messages to the default exchange on the default channel of the worker's connection to RabbitMQ server.
Inherited from MAKS\AmqpAgent\Worker\AbstractWorkerInterface
public
- 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.