Skip to content

Feature: emulate Redis Stream PEL in TestRedisBroker to route messages to min_idle_time subscribers - #2934

Open
ApusBerliozi wants to merge 14 commits into
ag2ai:mainfrom
ApusBerliozi:2927_emulate_redis_stream_PEL
Open

Feature: emulate Redis Stream PEL in TestRedisBroker to route messages to min_idle_time subscribers#2934
ApusBerliozi wants to merge 14 commits into
ag2ai:mainfrom
ApusBerliozi:2927_emulate_redis_stream_PEL

Conversation

@ApusBerliozi

@ApusBerliozi ApusBerliozi commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR presents general concepts of PEL implementation. What I propose:

1 - PEL is an external feature. While the best option would be to make it a part of TestRedisBroker, it is very hard to implement due to existing architecture. So, PEL would be created as an external fixture and passed into the class

2 - PEL is a class, that contains self._entries (which is basically a dict, with which we can receive needed Entry via correlation_id), and methods to get an entry, remove an entry and add accordingly

3 - We work with PEL in FakeProducer, we add an Entry to PEL after msg is formed, and check whether or not PEL is emtpy before it

Related #2927

Type of change

Please delete options that are not relevant.

  • Bug fix (a non-breaking change that resolves an issue)
  • New feature (a non-breaking change that adds functionality)
  • This change requires a documentation update

Checklist

  • My code adheres to the style guidelines of this project (just lint shows no errors)
  • I have conducted a self-review of my own code
  • I have made the necessary changes to the documentation
  • My changes do not generate any new warnings
  • I have added tests to validate the effectiveness of my fix or the functionality of my new feature
  • Both new and existing unit tests pass successfully on my local environment by running just test-coverage
  • I have ensured that static analysis tests are passing by running just static-analysis
  • I have included code examples to illustrate the modifications

@github-actions github-actions Bot added the Redis Issues related to `faststream.redis` module and Redis features label Jul 14, 2026
@ApusBerliozi
ApusBerliozi marked this pull request as ready for review July 16, 2026 11:52
@ApusBerliozi
ApusBerliozi requested a review from Lancetnik as a code owner July 16, 2026 11:52
@powersemmi powersemmi added the enhancement New feature or request label Jul 17, 2026
@ApusBerliozi

Copy link
Copy Markdown
Collaborator Author

Hey @powersemmi!
Could you please take a look at this one?

Comment thread faststream/redis/testing.py
Comment thread tests/brokers/redis/test_cluster_pubsub_more.py Outdated
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request Redis Issues related to `faststream.redis` module and Redis features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants