CoreShop
CoreShop copied to clipboard
[Feature request] Delayed messages are "missing"
Q | A |
---|---|
Bug report? | probably not |
Feature request? | probably yes |
BC Break report? | no |
RFC? | maybe |
This issue lives in the gray area between a bug and a missing feature, so not sure how to answer with a clear yes-no above :) Leaning towards a feature request.
Dispatching a message like this with a delay to the availability will cause it to not show in the MessengerBundle interface leading to questions like "did it actually register in the system?"
Should they show? At least as a pending message, right? But maybe not as any other message with immediate availability? What do you think, what is a good way to solve it?
use App\Model\Messenger\ProductFetchMessage;
use Symfony\Component\Messenger\MessageBusInterface;
use Symfony\Component\Messenger\Stamp\DelayStamp;
class FooMessageHandler
{
public function __construct(private MessageBusInterface $bus) {}
public function someAction(): void
{
$this->bus->dispatch(
new ProductFetchMessage($itemVariant->getId()),
[new DelayStamp(86_400_000)]
);
}
}