Home > Enterprise >  Sending x-message-ttl to RabbitMQ through Symfony Messenger
Sending x-message-ttl to RabbitMQ through Symfony Messenger

Time:03-10

How can I define x-message-ttl for a RabbitMQ queue with Symfony Messenger?

I see it is used with the DelayStamp, but I don't want to setup a Delay. I would simply like messages to drop if they are not handled within a certain time frame. I don't see it referenced anywhere else in the source code.

The only documentation I can find is for the old method of using the OldSound RabbitMq package.

CodePudding user response:

I figured it out indirectly through this PR.

messenger.yaml

framework:
    messenger:
        transports:
            mywork:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options:
                    exchange:
                        name: mywork
                        type: direct
                    queues:
                        mywork:
                            arguments:
                                x-message-ttl: 60000
  • Related