Skip to content

[Messenger] Failed messages show and max support #57512

@flohw

Description

@flohw

Symfony version(s) affected

6.4

Description

Hi,

I recently had to debug some failed messages in my messenger. The messages are stored in a database. I used the messenger:failed:show command with some options (--stats and --class-filter mainly) to have some clear views and filter on the messages I wanted.

The issue I was not understanding while debugging is that the stats reported me a total count of 478 messages in failure but the count per message was very low.
While filtering by class I get the same kind of result : the number of error listed in the view and in my table were not the same.

I was using the --max option with a number higher than 50 (the default) but I still had some results I was not understanding.

How to reproduce

Get more than 50 message in the failed transport.

Possible Solution

The --max option is useful to limit the number of result returned but it could affect debugging mainly with stats or class-filter options.

The max option should be applied later if possible to prevent such weird result. Looking at the code, it seems not easy. 😬 🤞

Additional Context

I didn't see related issues nor discussion on the pr which added the feature.

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