🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
Spring cloud stream API - connection retry
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?
Comments
-
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.
solace.java.connectRetries solace.java.reconnectRetries solace.java.connectRetriesPerHost solace.java.reconnectRetryWaitInMillis
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)
-Marc
0