Commit 185156f
committed
feature #46571 [Messenger] Add new
This PR was squashed before being merged into the 6.2 branch.
Discussion
----------
[Messenger] Add new `messenger:count` command that return a list of transports with their "to be processed" message count.
| Q | A
| ------------- | ---
| Branch? | 6.2
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR | Todo
### Why ?
I worked on a project that didn't had insights on how many messages were present in "queues" (because of some hosting quirks) and to have this information we've developed a command that aims to make it possible via the Symfony's console.
After a visio call with an ex-colleague on another Symfony project, it turns out that he was verry interested to have this command in Symfony.
I've also discused with @Jean-Beru that literraly pushed me too open that PR.
So here I am.
### What does it does ?
This quite simple, like for the `setup-transport` command it takes in input all configured transports' receivers and **Only if they implement `Symfony\Component\Messenger\Transport\Receiver\MessageCountAwareInterface`** it gets the message count and prints it out in a pretty little table.
### Limitation
This command won't work if the configured transport's receiver does not implement `Symfony\Component\Messenger\Transport\Receiver\MessageCountAwareInterface`
### A small demo ?
https://user-images.githubusercontent.com/35264408/171853603-6807f0d1-a251-4180-b34b-80d3a3c49b92.mp4
Commits
-------
e5433cd6da [Messenger] Add new `messenger:count` command that return a list of transports with their "to be processed" message count.messenger:count command that return a list of transports with their "to be processed" message count. (ktherage, ogizanagi, EXT - THERAGE Kevin)File tree
2 files changed
+15
-1
lines changed- DependencyInjection
- Resources/config
2 files changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
510 | 511 | | |
511 | 512 | | |
512 | 513 | | |
| 514 | + | |
513 | 515 | | |
514 | 516 | | |
515 | 517 | | |
| |||
1977 | 1979 | | |
1978 | 1980 | | |
1979 | 1981 | | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
1980 | 1986 | | |
1981 | 1987 | | |
1982 | 1988 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
209 | 217 | | |
210 | 218 | | |
211 | 219 | | |
| |||
334 | 342 | | |
335 | 343 | | |
336 | 344 | | |
337 | | - | |
| 345 | + | |
338 | 346 | | |
0 commit comments