Final Class Yiisoft\Queue\Amqp\Middleware\DelayMiddleware
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Yiisoft\ |
Public Methods
Method Details
| public mixed __construct ( float $delayInSeconds ) | ||
| $delayInSeconds | float | |
public function __construct(private float $delayInSeconds) {}
| public \ | ||
| $message | \ |
|
| $handler | \ |
|
public function processPush(MessageInterface $message, PushHandlerInterface $handler): MessageInterface
{
if ($this->delayInSeconds <= 0) {
return $handler->handlePush($message);
}
return $handler->handlePush(new DelayEnvelope($message, $this->delayInSeconds));
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.