Skip to content

[Messenger] Add ListableReceiverInterface support to RedisReceiver #61462

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

Open
wants to merge 8 commits into
base: 7.4
Choose a base branch
from

Conversation

mudassaralichouhan
Copy link

@mudassaralichouhan mudassaralichouhan commented Aug 19, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? yes
Deprecations? no
Tickets Fix #61436
License MIT
Doc PR symfony/symfony-docs#...

Description

This PR adds support for the ListableReceiverInterface to the Redis Messenger transport. It allows listing and finding messages in Redis-backed queues, enabling integrations with tools like zenstruck/messenger-monitor-bundle.

Features

  • RedisReceiver now implements ListableReceiverInterface
  • Uses Redis stream XRANGE commands
  • New methods in Connection: findAll(), find($id)
  • Fully tested (unit + functional)
  • Backward-compatible and non-breaking

Usage

$receiver->all();          // Returns all pending messages
$receiver->find('123-0');  // Returns a specific message by Redis stream ID

…e support to RedisReceiver (mudassarali)

This PR adds support for the ListableReceiverInterface to the Redis Messenger transport.

* RedisReceiver now implements ListableReceiverInterface
* New methods: all() for listing messages, find() for finding by ID
* Uses Redis XRANGE commands for efficient message retrieval
* Fully tested with comprehensive unit and functional tests
* Backward-compatible, no breaking changes
* Enables integration with monitoring tools like zenstruck/messenger-monitor-bundle
@carsonbot

This comment has been minimized.

@carsonbot carsonbot changed the title feature #61436 [Messenger][Redis] Add ListableReceiverInterface suppo… [Messenger] feature #61436 [Redis] Add ListableReceiverInterface suppo… Aug 19, 2025
@nicolas-grekas nicolas-grekas changed the title [Messenger] feature #61436 [Redis] Add ListableReceiverInterface suppo… [Messenger] Add ListableReceiverInterface support to RedisReceiver Aug 20, 2025
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice, I just have CS-related comments.

mudassaralichouhan and others added 7 commits August 20, 2025 13:04
Co-authored-by: Fabien Potencier <fabien@potencier.org>
…ceiver.php

Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
…ion.php

Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
…ion.php

Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
…ceiver.php

Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
- Replace hardcoded Relay\Exception references with conditional exception handling
- Use PHPDoc annotations for Relay types to avoid Psalm UndefinedClass errors
- Maintain runtime Relay support while making type annotations Psalm-friendly
- Move ListableReceiverInterface entry from 7.3 to 7.4 section per maintainer feedback
- Simplify functional test to avoid complex mocking issues
- All tests passing, Psalm-compliant, ready for CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support ListableReceiverInterface for RedisReceiver in symfony/redis-messenger
4 participants