Skip to content

[Feature request] Delayed messages are "missing" #2713

@NiklasBr

Description

@NiklasBr
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)]
        );
    }
}

Screenshot 2024-09-13 at 16 46 20

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions