-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[service-bus] docs.microsoft.com sample reporting "AMQP connection closed" #15308
Comments
I've repro'd this (intermittently) by connecting to a not-in-Redmond Service Bus. The issue appears to be that the client is closed but our auto-complete logic continues to run (or at least, it's finishing at the time when we're closed). What's interesting is that the exception in my repro throws from the management client - this would indicate that we noticed the link was closed and attempted to settle using our backup settlement method. The behavior as it is today seems bad because you can't easily reason about when a receiver is no longer "active" (meaning, no longer doing work). We need to properly coordinate the receiver being closed by the user with any outstanding settlement requests and cancel them. |
Some more diagnostics: There was a delay on the application closing, even after the service client was closed:
and then afterwards:
These are all occurring way too late so it appears we might be missing some cleanup when the receiver has been closed. |
Another little odd tidbit from the logs:
Note that at this point we have closed the receiver. I would not have expected the connection to still see one in it's map (it might be that we don't clean it up at that point). (UPDATE: this set of log messages appear to be an unrelated symptom to this issue, and was fixed by #15890) |
Leaving a last note on this, as I'm stepping away as maintainer of this particular package: From what I can tell what we're running up against is the fact that So for now I'm not sure, beyond adjusting the sample, if we want to address anything here. I'll leave this open for @chradek to decide if we should do more. |
SF updates for 8.1 (Azure#15308) * SF updates for 8.2 * fixed typo and added 8.1 * set the version to match. * fixed last typo. * fixed missing block. * remove Go SDK from auto-codegen * avoid hitting credscan alerts. Co-authored-by: Joel Hendrix <jhendrix@microsoft.com>
I agree with @richardpark-msft. The sample fix is enough and at this point there are no work planned here. Closing |
The sample: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-nodejs-how-to-use-queues
Customer, in email thread, is reporting that the sample, prior to receiving all messages, reports "The underlying AMQP connection is closed". The sample itself only waits 5 seconds and the reported errors reports an errorSource of
complete
. These probably indicate the issue is related to auto complete, as far as the error.However, only receiving 3 messages within 5 seconds might point to a further problem. I need to investigate and see if we need to reasonably bump that up in the sample to match reality a bit more and also see if we like how the error message is reported. We might need to coordinate the "connection is closing" event with the individual settlement methods.
(original issue: MicrosoftDocs/azure-docs#75397)
The text was updated successfully, but these errors were encountered: