1

I am using Azure service bus with Java SDK. Currently not find any way where I can verify that connection is established or not. Is there any method or way where I can check connection is established with azure service bus?

I tried and failed to find specific way to do that.

4
  • No API exists to check connection status, as there is no real benefit to doing so. Your application does not need to manage connections explicitly, the SDK clients have responsibility for doing so. The SDK manages connections dynamically and creates or re-creates them as needed for a service operation to take place. Commented Dec 30, 2022 at 12:44
  • So, their is no any way where we can check connection ? Commented Jan 2, 2023 at 6:49
  • In my application scenario, after provide particular details for connection , I have to verify connection is exist or not. Even i am not call every time for connection because azure service bus provide some limitation for that (1000 connection call). Commented Jan 2, 2023 at 6:53
  • The client creates connections lazily, when needed for a service operation. Even if a "check connection" function existed, it would return "false" until you initiated an operation. It sounds like what you're looking to do is validate your connection information and quotas. The best approach would be to do something like create a receiver and peek messages, which would require the connection to be created. Commented Jan 2, 2023 at 14:07

1 Answer 1

-1

One of the way to check whether connection is established or not is sending and receiving message from service bus. Once you have configured connection, try to send or receive message from service bus. You can check whether message is received or not using Azure portal also.

Refer this link enter link description herefor more information

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.