-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Implement MessageCountAwareInterface in RedisTransport #39127
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
[Messenger] Implement MessageCountAwareInterface in RedisTransport #39127
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please add tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might not be the count we expect. I'm "blocking" this PR until we can confirm it.
See #31545 (comment)
#30917 (comment) for previous attempts.
ping @alexander-schranz
@chalasr I'll check this out. The queue needs to have Any pointers would be appreciated. Thanks 👍 |
As correctly linked by @chalasr the way to get the length would be what I have commented at: #31545 (comment). The problem here is that redis depending on your redis extension version does return the Aslong as |
@chrishemmings Are you still working on this PR? |
Hi there, for now I don't have time to look at this, it's turned into a more complex problem than I initially though. Closing. |
To try reviving this issue; would the blocker we had earlier for getting this feature still be there? Could we use a command like XPENDING for checking the Redis stream length? https://redis.io/commands/xpending/ |
No more blocker, the message count will be available for redis as of Symfony 6.2 thanks to #46229 |
[Messenger] Implement MessageCountAwareInterface in RedisTransport
Implement MessageCountAwareInterface in RedisTransport by providing the getMessageCount() method in the Connection class. This calls xLen() on the Redis steam to return the number of items left to process.