Skip to content

RedisMessageListenerContainer resubscribe using Jedis fails after exception #2782

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

Closed
ssu888 opened this issue Nov 22, 2023 · 1 comment
Closed
Assignees
Labels
type: bug A general bug

Comments

@ssu888
Copy link

ssu888 commented Nov 22, 2023

image
When redis is failing at this point and the program is running to the
' connectionFactory.getConnection()'
then it will report a RedisConnectionFailureException;
image
But it's caught by the outer catch, which causes it to not go to the inner 'handleSubscriptionException' method, resulting in an inability to keep retrying

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 22, 2023
@mp911de mp911de self-assigned this Nov 23, 2023
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 23, 2023
@mp911de mp911de changed the title Application can't retry resubscribing to topics after redis fails to restart RedisMessageListenerContainer resubscribe fails after exception Nov 23, 2023
@mp911de
Copy link
Member

mp911de commented Nov 23, 2023

Thanks for raising the issue. I can confirm that problem and we need to fix it.

@mp911de mp911de changed the title RedisMessageListenerContainer resubscribe fails after exception RedisMessageListenerContainer resubscribe using Jedis fails after exception Nov 23, 2023
christophstrobl pushed a commit that referenced this issue Dec 15, 2023
…ry after subscription.

We now differentiate exception handling regarding the recovery state. Initial listen fails if the connection is unavailable. Upon recovery after a preceeding subscription we now log the success to create a counterpart to our error logging.

Closes: #2782
Original Pull Request: #2808

# Conflicts:
#	src/main/java/org/springframework/data/redis/listener/RedisMessageListenerContainer.java
#	src/test/java/org/springframework/data/redis/listener/RedisMessageListenerContainerUnitTests.java
christophstrobl pushed a commit that referenced this issue Dec 15, 2023
…ry after subscription.

We now differentiate exception handling regarding the recovery state. Initial listen fails if the connection is unavailable. Upon recovery after a preceeding subscription we now log the success to create a counterpart to our error logging.

Closes: #2782
Original Pull Request: #2808
@christophstrobl christophstrobl added this to the 3.1.7 (2023.0.7) milestone Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
4 participants