Skip to content
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

Eventhub subscription receives empty messages after having lost connection. #12444

Closed
Ward6548 opened this issue Nov 10, 2020 · 3 comments
Closed
Assignees
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

Comments

@Ward6548
Copy link

  • Package Name: @azure/event-hubs
  • Package Version: 5.3.0
  • Operating system: MacOS
  • nodejs v10

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:

  1. 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

  2. Add a console.log or debugger in the very top of the processEvents handler. (Line 38)

  3. Remove the part where the connection is automatically closed after a delay. (Line 58 to 62).

  4. Run the script.

  5. Disconnect from the internet.

  6. Wait +/-2 minutes.

  7. 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.

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 10, 2020
@chradek
Copy link
Contributor

chradek commented Nov 10, 2020

@Ward6548 Thanks for reporting this issue! I believe this is a duplicate of #12278.

We've merged a fix for this in #12280 and expect to publish version 5.3.1 with this fix included this week. If you want to test this change before it's been published, you can install the nightly build of the event hubs package by running npm install @azure/event-hubs@dev.

I'll post back here once 5.3.1 has been published to npm!

@chradek chradek added 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. duplicate This issue is the duplicate of another issue Event Hubs labels Nov 10, 2020
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Nov 10, 2020
@chradek chradek removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Nov 10, 2020
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Nov 10, 2020
@chradek chradek removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Nov 10, 2020
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Nov 10, 2020
@chradek chradek self-assigned this Nov 10, 2020
@chradek chradek added this to the [2020] November milestone Nov 10, 2020
@ramya-rao-a ramya-rao-a removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Nov 10, 2020
@Ward6548
Copy link
Author

I've tested the nightly build and it works as expected. Looking forward to the official release. Thank you!

@chradek
Copy link
Contributor

chradek commented Nov 12, 2020

@Ward6548 glad to hear it!

We have just published @azure/event-hubs 5.3.1 which includes this fix.
I'm closing this issue, but please feel free to open a new issue or post here if you still encounter this issue after updating.

@chradek chradek closed this as completed Nov 12, 2020
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-js that referenced this issue Jan 20, 2021
[Hub Generated] Review request for Microsoft.Network to add version stable/2020-11-01 (Azure#12444)

* add fields for 20201101

* fix waf json

* fix waf json

* minor fix

* prettier fix for waf json

* minor fix
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
Development

No branches or pull requests

3 participants