spring-projects / spring-projects/spring-data-redis
Switch `StreamMessageListenerContainer` default to not unsubscribe on simple exception
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
While using Redis Stream, I encountered an issue where the consumer faced an exception while consuming, leading to the cancellation of subscription by the StreamMessageListenerContainer. I found that this was due to cancelSubscriptionOnError being triggered when encountering an exception. However, StreamReadRequest is package-private, so I have no way to modify cancelSubscriptionOnError. I'd like to inquire about how to handle consumer exceptions during consumption to maintain the subscription intact.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with StreamMessageListenerContainer and the package-private StreamReadRequest, then trace how cancelSubscriptionOnError handles consumer exceptions. The change is complete when a simple consumption exception no longer cancels the subscription by default; the payload does not name a test to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, redis
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100