sroze / messenger-enqueue-transport

Uses Enqueue with Symfony's Messenger component.
MIT License
191 stars 55 forks source link

The "failed" receiver does not support listing or showing specific messages #110

Open Hubbitus opened 2 years ago

Hubbitus commented 2 years ago

Hello.

I've setup failed transport as local filesystem write: config/packages/messenger.yaml:

framework:
    messenger:
        # Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
        failure_transport: failed

        transports:
            async_kafka:
               ...
            failed:
                dsn: 'enqueue://enqueue_file?topic[name]=fails'

        routing:
            # Route your messages to the transports
            'App\DAO\DemoNotification': [ async_kafka ]

config/packages/enqueue.yaml:

enqueue:
    enqueue_file:
        transport:
            dsn: 'file://'
            path: '%kernel.project_dir%/var/queue/kafka.mirror'

Together with configuring custom middleware by https://github.com/symfony/symfony/issues/35521 I be able to send messages into failed queues when Kafka is not available.

Meantime I can't read that:

bin/console messenger:failed:show
[critical] Error thrown while running command "messenger:failed:show". Message: "The "failed" receiver does not support listing or showing specific messages."

Looks like just should be implemented MessageCountAwareInterface, ListableReceiverInterface?

Similar to the said https://github.com/alekitto/messenger-extra/issues/13

P.S. Initially reported into enqueue: https://github.com/php-enqueue/enqueue-dev/issues/1226