Fix RedisStreamListener ignoring endpoint DatabaseId (#2447)#2452
Merged
jeremydmiller merged 1 commit intoJasperFx:mainfrom Apr 8, 2026
Merged
Conversation
Three call sites in RedisStreamListener called GetDatabase() without passing _endpoint.DatabaseId, causing ConsumerLoop, CompleteAsync, and DeferAsync to always operate on db0 instead of the configured database. Add regression test that publishes and consumes on databaseId 1.
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.
Summary
Fixes #2447 —
RedisStreamListenerignored the configuredDatabaseIdonRedisStreamEndpoint, causing the consumer loop, ACK, and requeue operations to always targetRedis db0.
Three call sites in
RedisStreamListenercalled_transport.GetDatabase()without passing_endpoint.DatabaseId, falling back to the defaultdatabase: 0parameter:ConsumerLoopCompleteAsyncDeferAsyncOther methods in the same class (
MoveToErrorsAsync,InitializeAsync,MoveScheduledToReadyStreamAsync,DeleteExpiredAsync) already correctly passeddatabase: _endpoint.DatabaseId.Changes
src/Transports/Redis/Wolverine.Redis/Internal/RedisStreamListener.cs— passdatabase: _endpoint.DatabaseIdto the three affectedGetDatabase()callssrc/Transports/Redis/Wolverine.Redis.Tests/NonDefaultDatabaseTests.cs— regression test that publishes and consumes ondatabaseId: 1, verifying the listener honorsnon-default databases