-
Notifications
You must be signed in to change notification settings - Fork 439
Closed
Labels
Description
Let's assume we have a message like
<?php
use Enqueue\Client\Message;
$message = new Message();
$message->setDelay(60); // seconds
/** @var \Enqueue\Client\ProducerInterface $producer */
$producer->sendEvent('aTopic', `$message);
Based on the documentation, the delay is in seconds.
In DbalProducer.php you act on the assumption, that you are not working with seconds, divide them with 1000 and making it all useless.
$delay = $message->getDeliveryDelay();
if ($delay) {
[...]
$dbalMessage['delayed_until'] = time() + (int) $delay / 1000;
}
If you need a delay of 1 day (86400s), you'll only get 1 minute and 26 seconds