Implement a custom function that will be triggered when the application connects back to Solace

himanshu007
himanshu007 Member Posts: 2
edited December 2024 in PubSub+ Event Broker #1

Hello Community, I am using solace spring stream for our application. We came across an issue where the connection gets broken to Solace. We need to check live site when solace gets connected, only then we start the bindings. Is there a way we could implement a custom function checkLiveSite whenever our application gets connected to Solace Broker?

We use below config for automatic connection in Spring Cloud Stream:

Comments

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 664 admin

    Hey @himanshu007, looks like you never got a response to your query. I'm a bit confused though: what is a "live site"..? What/where are you hoping to check?

    From your conifg, it looks like you've configured the binder to attempt to reconnect for a good long while. But are you saying: you want to test the broker is available before attempting to connect?

    If you're talking about checking the broker, the only thing I can think of that may help is that the broker exposes an HTTP port for load balancers to check the health of the broker. Not sure if that's what you're going for. Docs here: https://docs.solace.com/Admin/Load-Balancer-Health-Check.htm

    Let us know.