Skip to content

[messenger] Failed message never delivered to failed queue after retry #37985

Closed
@jmhoueg

Description

@jmhoueg

Symfony version(s) affected: 5.1.3

Description
Using messenger with RabbitMQ, after a message fails and is retried 2 times, the message should be sent to the failed queue but it doesn't happen for me. This is my messenger.yaml:

framework:
    messenger:
        # Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
        failure_transport: amqp_create_order_error
        transports:
            # https://symfony.com/doc/current/messenger.html#transport-configuration
            amqp_create_order:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options:
                    exchange:
                        name: 'ms.customer-order'
                        type: topic
                    queues:
                        ms.customer-order;onestock_create_order:
                            binding_keys:
                                - 'create_order'
                retry_strategy:
                    max_retries: 2
            amqp_create_order_retry_30000:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options:
                    exchange:
                        name: 'ms.customer-order'
                        type: topic
                    queues:
                        ms.customer-order;create_order_retry_30000:
                            binding_keys:
                                - 'create_order_retry_30000'
            amqp_create_order_error:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options:
                    exchange:
                        name: 'ms.customer-order'
                        type: topic
                    queues:
                        ms.customer-order;create_order_error:
                            binding_keys:
                                - 'create_order_error'
            # failed: 'doctrine://default?queue_name=failed'
            # sync: 'sync://'
        routing:
            # Route your messages to the transports
            'App\Message\CreateOneStockOrderMessage': amqp_create_order

I read #31455 and according to what was said it should work without trouble. What can i do please?

How to reproduce
Use my messenger.yaml, create a handler which fails and see what happens

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy