Add Redis list-based queue support with async hook#63937
Open
tardunge wants to merge 2 commits intoapache:mainfrom
Open
Add Redis list-based queue support with async hook#63937tardunge wants to merge 2 commits intoapache:mainfrom
tardunge wants to merge 2 commits intoapache:mainfrom
Conversation
Member
|
@tardunge This PR has a few issues that need to be addressed before it can be reviewed — please see our Pull Request quality criteria. Issues found:
What to do next:
There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack. |
Adds durable list-based messaging to the Redis provider using LPUSH/BRPOP, complementing the existing pub/sub support. List-based queues provide message persistence until consumed and exactly-once delivery semantics via atomic BRPOP, which pub/sub cannot guarantee. New components: - RedisLPushOperator: push messages to Redis lists - AwaitMessageFromListTrigger: async trigger using BRPOP with priority queue support (multiple lists checked in order) - RedisListMessageQueueProvider: common-messaging integration with redis+list:// scheme - RedisHook.get_async_conn(): async context manager using redis.asyncio for truly non-blocking trigger operations
- Provide defaults for host/port/db to satisfy AsyncRedis constructor type requirements (str, int, int instead of Optional types) - Use close() instead of aclose() for redis-py compatibility
e476eb6 to
aeaa9c0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds durable list-based messaging to the Redis provider using LPUSH/BRPOP, complementing the existing pub/sub support.
Motivation: Redis pub/sub is fire-and-forget — messages are lost if no subscriber is listening. List-based queues (LPUSH + BRPOP) provide message persistence until consumed, exactly-once delivery via atomic BRPOP, and priority queue patterns via ordered multi-list BRPOP.
New components:
RedisLPushOperator— push messages to Redis lists (FIFO queue producer)AwaitMessageFromListTrigger— async trigger using BRPOP with priority queue support (multiple lists checked in order)RedisListMessageQueueProvider— common-messaging integration withredis+list://schemeRedisHook.get_async_conn()— async context manager usingredis.asynciofor truly non-blocking trigger operations (the existing hook is sync-only, which requiressync_to_asyncwrapping in triggers)No new dependencies —
redis.asynciois part ofredis>=4.2.0, and the provider already requiresredis>=4.5.2.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.6) following the guidelines