Uploaded image for project: 'Spring Data Redis'
  1. Spring Data Redis
  2. DATAREDIS-1053

ListenToChannel doesn't close connection / channels on doFinally

    Details

      Description

      Connection to Redis are never closed after doFinally call, which leads to a big number of active connections. I'm not sure it's a desired behavior.

      Current Behavior

      I'm creating a reactive Flux SSE with listenToChannel methods. When the doFinally is called, the redis connection still active and channel is still active too.
      It means that if I have a micro network cut, I still have all the reconnection, although the fluxes are over.

      I made this sample project to demonstrate :

      https://github.com/zthulj/issue-reactive-redis-lettuce

      Just run the project and make some
      curl localhost:8080/test
      And CTRL+C after one heartbeat.

      If you then put a debug on the App.java:30, you'll see that the redisclient still have all the pub sub connections actives and the channels too.

      If you then make some docker stop / start on the redis container, you'll see that every connection are reconnecting

      Expected behavior/code

      Connections should be closed when the flux are over ?

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mp911de Mark Paluch
                Reporter:
                zthulj Jérémy Thulliez
                Last updater:
                Mark Paluch
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: