Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Messenger] Make Redis messages countable#46229

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@Jean-Beru
Copy link
Contributor

QA
Branch?6.1
Bug fix?no
New feature?no
Deprecations?no
Tickets
LicenseMIT
Doc PR

Each Messenger Transport can return the number of messages present in the queue. For example, when we use themessenger:failed:retry command, Messenger displays the number of messages to retry.

Actually, this count is not displayed when usingRedisTransport. This PR adds this functionality.

@carsonbotcarsonbot added this to the6.1 milestoneMay 2, 2022
@Jean-BeruJean-Beruforce-pushed themessenger/redis-message-count-aware branch from4c0b6be tocfdf9ceCompareMay 2, 2022 11:40
@chalasr
Copy link
Member

Getting the actual message count might be more complicated:#39127.
/cc@alexander-schranz fyi

@chalasrchalasr modified the milestones:6.1,6.2May 2, 2022
@alexander-schranz
Copy link
Contributor

alexander-schranz commentedMay 2, 2022
edited
Loading

@chalasr yesxlen does not represent the number which somebody would expect. It requires another logic. See comment here:#31545 (comment). I know thatxinfo format changed between versions of the php redis extension, so it is not easy task here. So there need to be checked how to implement this for different versions. Also there could be that they did add a easier way to get the correct value. I did not yet update myself about the changes in the streams in Redis 6.

chalasr and Jean-Beru reacted with thumbs up emoji

@Jean-Beru
Copy link
ContributorAuthor

Thanks@alexander-schranz ! I updated my code.

But, I am wondering if we have to limitxRange results to 1000 (for example) in order to limit memory usage and use the last element to get the next "page" (like using a SCAN).

@alexander-schranz
Copy link
Contributor

I did have a look at the latest changes about redis. The new version Redis 7 providesentries_read andlag.

redis/redis#9127
https://redis.io/commands/xinfo-groups/

Not 100% sure but could be that lag provide the information we need.

@Jean-Beru
Copy link
ContributorAuthor

I ran tests on a Redis 7.x alag seems to do the job !

alexander-schranz reacted with thumbs up emoji

@Jean-BeruJean-Beruforce-pushed themessenger/redis-message-count-aware branch 2 times, most recently froma403e97 toffd2b07CompareMay 23, 2022 19:34
@fabpotfabpotforce-pushed themessenger/redis-message-count-aware branch fromffd2b07 toe1a896fCompareJuly 20, 2022 16:34
@fabpot
Copy link
Member

Thank you@Jean-Beru.

@fabpotfabpot merged commit2949e9c intosymfony:6.2Jul 20, 2022
@alexander-schranz
Copy link
Contributor

Good work@Jean-Beru 👍

@Jean-BeruJean-Beru deleted the messenger/redis-message-count-aware branchJuly 20, 2022 17:30
@Jean-Beru
Copy link
ContributorAuthor

Thanks a lot for your help@alexander-schranz !

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@chalasrchalasrchalasr left review comments

+1 more reviewer

@alexander-schranzalexander-schranzalexander-schranz approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

6.2

Development

Successfully merging this pull request may close these issues.

5 participants

@Jean-Beru@chalasr@alexander-schranz@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp