8000 [messenger] Failed message never delivered to failed queue after retry · Issue #37985 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jmhoueg opened this issue Aug 29, 2020 · 6 comments
Closed

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

jmhoueg opened this issue Aug 29, 2020 · 6 comments

Comments

@jmhoueg
Copy link
jmhoueg commented Aug 29, 2020

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

@carsonbot
Copy link

Hey, thanks for your report!
There has not been a lot of activity here for a while. Is this bug still relevant? Have you managed to find a workaround?

@carsonbot
Copy link

Hello? This issue is about to be closed if nobody replies.

@carsonbot
Copy link

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!

@yarovskiy
Copy link

Hello! I have the same trouble(
And I don't know how to resolve it.

@yarovskiy
Copy link
yarovskiy commented Jan 18, 2022

@jmhoueg, if you add to current failed transport (amqp_create_order_error) this binding_key "ms.customer-order;onestock_create_order" - you will receive messages in failed queue.
I found this with debug for me, but I still looking for more rigth decision

@blkBuddah
Copy link

Thanks, fixed the problem a long time ago but dont remember what i did exactly. I think i used a middleware

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0