In one of my Java-Spring boot based micro-service, i have the Solace integration setup for messaging. I am using the spring-cloud-stream and Solace binder to connect the Solace.
Overall the integration works well, however whenever i am rebooting the Solace server, the spring-boot service is not able to make a connection to Solace. Even after retrying 10 times its not able to establish the connection. Then i have to manually start the spring-boot service and then the connection reestablish.
Is there any configuration i can use to have to force reconnect between spring-cloud-stream and Solace.
Thanks Anuj
I test this locally using the sample app here and it worked fine. App was connected. Turned off broker. Turned broker back on. App reconnected. https://github.com/SolaceSamples/solace-samples-spring/tree/master/cloud-stream-sink
You can configure your connect and reconnect retries using
connectRetries,reconnectRetries, etc prefixed bysolace.javaorspring.cloud.stream.binders.<binder-name>.environment.solace.java. But by defaultreconnectRetriesis set to-1which should retry forever. Can you make sure you don't have them set to something else?While the broker service isn't available you should see the app logging something like this:
And then when it reconnected I saw this: