Eventhub subscription receives empty messages after having lost connection. #12444
Labels
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
duplicate
This issue is the duplicate of another issue
Event Hubs
Milestone
Describe the bug
When losing connection while being subscribed to messages on an event-hub, I'm receiving a, what seems to be infinite, loop of empty messages in the processEvents handler. There is no delay between the messages.
To Reproduce
Steps to reproduce the behavior:
Download and setup the example defined here: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/samples/javascript/receiveEvents.js
Add a console.log or debugger in the very top of the processEvents handler. (Line 38)
Remove the part where the connection is automatically closed after a delay. (Line 58 to 62).
Run the script.
Disconnect from the internet.
Wait +/-2 minutes.
Watch an infinite loop of processEvents being called.
(I don't think it's required to have any events in the event hub queue.)
Expected behavior
I would expect only a processError event to be handled. Maybe at most one processEvent to receive part of a batch before having lost the connection, but not an infinite loop. Certainly not without any delay in between.
The text was updated successfully, but these errors were encountered: