Closed Divyasri1510 closed 3 months ago
This is expected behavior, as the connection is automatically closed after ~5 minutes of idleness (or ~1 minute if no link was created). At this point a new connection needs to be created, which takes longer then re-using a previously created connection and link. To keep the connection and link open, make sure to do an operation before the connection times out.
Description
Hi, I'm seeing some latency change while sending a message to an Azure Service Bus queue. We tried to check this by creating client and then sending message after specific interval durations of 2mins, 5mins and 10mins. Initially it took 2 secs for message to be sent. After making thread to sleep for 5mins, we sent message again and now it took only few milliseconds. Then after 10mins when we sent message again it took around 10seconds. We also observed multiple active connections being created. Below is the code snippet that we tried. Can you please explain why this is happening and what needs to be done for time to take few milliseconds for sending message always?
The result we got is:
Actual Behavior
Expected Behavior