spring-projects / spring-projects/spring-data-redis

`StreamMessageListenerContainer` stops consuming messages after connection timeout to Redis

Open
#2,833 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: feedback-provided status: waiting-for-triage
Dominant language
Java
Stars
1.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Problem

I have been following this guide for implementing asynchronous message listeners for Redis streams. The listeners work as expected at first. However, if a temporary connection timeout occurs towards Redis (e.g. Redis becomes unavailable), the listeners stop consuming messages indefinitely (even though Redis is available).

How to reproduce

  1. Create a message listener using this guide (with a StreamMessageListenerContainer).
  2. Publish an event (to make sure the message is successfully received).
  3. Restart the Redis instance (to simulate a connection timeout)
  4. Publish an event (should not be received)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Redis Streams listener-container guide and reproduce the failure using StreamMessageListenerContainer: receive a message, restart Redis, then publish another message. Trace what happens after the temporary connection timeout and verify that listeners resume consuming messages once Redis is available again.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, redis, spring
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.