Skip to content

[Messenger] Add an option to configure message flags #28053

@fnyu

Description

@fnyu

Description
Currently there is no option to configure message flags when publishing via Amqp Transport. Flag AMQP_NOPARAM is hardcoded into the publishing function: https://github.com/symfony/messenger/blob/v4.1.2/Transport/AmqpExt/Connection.php#L101.
I think it should be configurable by the developer as there is no way to publish e.g. persistent messages. Once this Feature Request is accepted I am happy to provide PR myself.

Example
I imagine that it would look like this in the code:

$message = new MyMessage("Hello world");
$bus->dispatch((new Envelope($message))->withFlags(AMQP_DURABLE));

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