Spring cloud stream API - connection retry

matthesu Unconfirmed, Member Posts: 13

I have my program running and everything works fine. To test connection retry, I brought down my queue. It did not see any retry from the api, eventually I had to restart my application after bringing the queue up. Is there any specific property which I need to enable to make it reconnect automaticallyin this specific connection failure scenario?
This is the first negative test case I have tried. I will try the re connection later by bringing the VPN itself down. Will it try to reconnect in both the above cases(queue went down in between & VPN is down in between) automatically?


  • marc
    marc Member, Administrator, Moderator, Employee Posts: 923 admin

    Hi @matthesu,

    You can configure retries on the SCSt. binder by setting the following properties on the binder config, and can read more about that here.


    From a testing perspective disabling the VPN itself would be better to simulate the service not being available. In the event of turning off the ability to consume from the queue the app is still able to connect to the service and then just can't bind to the queue which would simulate more of a configuration problem.

    I shutdown my VPN and saw it trying to reconnect with log entries like this:

    2020-07-07 15:01:30.285  INFO 44207 --- [connect_service] c.s.j.protocol.impl.TcpClientChannel     : Connecting to host 'orig=mr-d8f4yze27kt.messaging.solace.cloud:55555, host=mr-d8f4yze27kt.messaging.solace.cloud, port=55555' (host 1 of 1, smfclient 2, attempt 1 of 5, this_host_attempt: 2 of 21)