Skip to content

[Messenger] Failed messages command applies limit to stats #60821

Open
@cs278

Description

@cs278

Symfony version(s) affected

6.4.21

Description

The messenger:failed:show command has a --stats option that is limited by the --max option which leads to very surprising/confusing results.

I've found #57512 which I think is the same issue but it's not 100% clear.

How to reproduce

Generate many failed messages (over 50) then run: bin/console messenger:failed:show --stats you will see the total is X but then the count for each class will not add up to X because the command has only examined 50 messages.

Possible Solution

The --max option should either be ignored or ignored unless explicitly set.

Additional Context

Example from our system:

web@eb.0:~$ bin/console messenger:failed:show --stats
There are 1582 messages pending in the failure transport.
 ------------------------------------------------------- ------- 
  Class                                                   Count  
 ------------------------------------------------------- ------- 
  ***************\Message\**********************Message   1      
  ***************\Message\*********************Message    49     
 ------------------------------------------------------- ------- 

1+49 != 1582.

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