Interface Yiisoft\Queue\QueueInterface
| Implemented by | Yiisoft\Queue\Debug\QueueDecorator, Yiisoft\Queue\Queue, Yiisoft\Queue\Stubs\StubQueue |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| getName() | Returns the logical name of the queue. | Yiisoft\Queue\QueueInterface |
| listen() | Listen to the queue and execute jobs as they come | Yiisoft\Queue\QueueInterface |
| push() | Pushes a message into the queue. | Yiisoft\Queue\QueueInterface |
| run() | Execute all existing jobs and exit | Yiisoft\Queue\QueueInterface |
| status() | Yiisoft\Queue\QueueInterface |
Method Details
Returns the logical name of the queue.
| public abstract string getName ( ) |
public function getName(): string;
Listen to the queue and execute jobs as they come
| public abstract void listen ( ) |
public function listen(): void;
Pushes a message into the queue.
| public abstract Yiisoft\Queue\Message\MessageInterface push ( Yiisoft\Queue\Message\MessageInterface $message, array|callable|Yiisoft\Queue\Middleware\Push\MiddlewarePushInterface|string $middlewareDefinitions ) | ||
| $message | Yiisoft\Queue\Message\MessageInterface | |
| $middlewareDefinitions | array|callable|Yiisoft\Queue\Middleware\Push\MiddlewarePushInterface|string | |
public function push(MessageInterface $message, MiddlewarePushInterface|callable|array|string ...$middlewareDefinitions): MessageInterface;
Execute all existing jobs and exit
| public abstract integer run ( integer $max = 0 ) | ||
| $max | integer | |
| return | integer |
Number of messages processed. |
|---|---|---|
public function run(int $max = 0): int;
Signup or Login in order to comment.