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.

starball
  • 20,030
  • 7
  • 43
  • 238
  • 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. – Jesse Squire Dec 30 '22 at 12:44
  • So, their is no any way where we can check connection ? – yogesh prajapati Jan 02 '23 at 06: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). – yogesh prajapati Jan 02 '23 at 06: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. – Jesse Squire Jan 02 '23 at 14:07

1 Answers1

-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

vijaya
  • 1,525
  • 1
  • 2
  • 6