Interface Yiisoft\Queue\Adapter\AdapterInterface
| Implemented by | Yiisoft\Queue\Adapter\SynchronousAdapter, Yiisoft\Queue\Stubs\StubAdapter |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| getChannel() | Yiisoft\Queue\Adapter\AdapterInterface | |
| 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 |
| withChannel() | 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.
| public abstract \Yiisoft\Queue\JobStatus status ( integer|string $id ) | ||
| $id | integer|string |
ID of a job message. |
| throws | InvalidArgumentException |
When there is no such id in the adapter. |
|---|---|---|
public function status(string|int $id): JobStatus;
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;
| public abstract self withChannel ( string|\BackedEnum $channel ) | ||
| $channel | string|\BackedEnum | |
public function withChannel(string|BackedEnum $channel): self;
Signup or Login in order to comment.