Interface Yiisoft\Queue\Adapter\AdapterInterface
| Implemented by | Yiisoft\ |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| push() | Pushing a message to the queue. Adapter sets message ID if available. | Yiisoft\ |
| runExisting() | Returns the first message from the queue if it exists (null otherwise). | Yiisoft\ |
| status() | Returns status code of a message with the given ID. | Yiisoft\ |
| subscribe() | Listen to the queue and pass messages to the given handler as they come. | Yiisoft\ |
Method Details
Pushing a message to the queue. Adapter sets message ID if available.
| public abstract Yiisoft\ | ||
| $message | Yiisoft\ |
|
public function push(MessageInterface $message): MessageInterface;
Returns the first message from the queue if it exists (null otherwise).
| public abstract void runExisting ( callable $handlerCallback ) | ||
| $handlerCallback | callable |
The handler which will handle messages. Returns false if it cannot continue handling messages |
public function runExisting(callable $handlerCallback): void;
Returns status code of a message with the given ID.
Returns {@see \
| public abstract \ | ||
| $id | integer|string |
ID of a message. |
public function status(string|int $id): MessageStatus;
Listen to the queue and pass messages to the given handler as they come.
| public abstract void subscribe ( callable $handlerCallback ) | ||
| $handlerCallback | callable |
The handler which will handle messages. Returns false if it cannot continue handling messages. |
public function subscribe(callable $handlerCallback): void;
User Contributed Notes
Leave a comment
Join the conversation to share a note.