Interface Yiisoft\Queue\Adapter\AdapterInterface
| Implemented by | Yiisoft\Queue\Stubs\InMemoryAdapter |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| push() | Pushing a message to the queue. Adapter sets message ID if available. | Yiisoft\Queue\Adapter\AdapterInterface |
| runExisting() | Returns the first message from the queue if it exists (null otherwise). | Yiisoft\Queue\Adapter\AdapterInterface |
| status() | Returns status code of a message with the given ID. | Yiisoft\Queue\Adapter\AdapterInterface |
| subscribe() | Listen to the queue and pass messages to the given handler as they come. | Yiisoft\Queue\Adapter\AdapterInterface |
Method Details
Pushing a message to the queue. Adapter sets message ID if available.
| public abstract Yiisoft\Queue\Message\MessageInterface push ( Yiisoft\Queue\Message\MessageInterface $message ) | ||
| $message | Yiisoft\Queue\Message\MessageInterface | |
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 \Yiisoft\Queue\MessageStatus::NOT_FOUND} when status tracking is not supported or there is no such id.
| public abstract \Yiisoft\Queue\MessageStatus status ( integer|string $id ) | ||
| $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;
Signup or Login in order to comment.