Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Messenger] fixes for Redis transport #53394

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

Closed

Conversation

AdamKatzDev
Copy link
Contributor

@AdamKatzDev AdamKatzDev commented Jan 3, 2024

Q A
Branch? 7.1
Bug fix? yes
New feature? yes
Deprecations? no
Issues Fix #49023, mostly fixes #44400.
License MIT

New minor feature: separate pending_interval for pending messages.

The PR overhauls Redis receiver. Fetch pending messages step is split into getting claimed messages and pending messages.
Claim step uses XAUTOCLAIM to claim messages instead of using XPENDING and XCLAIM combo. That simplifies code a lot. This step can be rewritten without XAUTOCLAIM to support older Redis versions.
Fetching pending messages is implemented using WeakMap, when WeakMap is empty, i.e. there are no messages in the worker currently, we just iterate all consumer pending messages using XREADGROUP starting from 0.

That approach resolves #49023 and #44400 part that is specifically caused by using batch handlers.

This PR does not fix other important issues:

@carsonbot
Copy link

Hey!

To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done?

Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review.

Cheers!

Carsonbot

@AdamKatzDev
Copy link
Contributor Author

I'll keep this as a draft, I am not planning to finish this, sadly.

@carsonbot carsonbot closed this Jan 3, 2024
@chalasr
Copy link
Member

chalasr commented Jan 3, 2024

No worries, the patch is now available to anyone wiling to take over even if the PR is closed. Thanks for that @AdamKatzDev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants