[Event Hubs] MaxListenersExceededWarning when stopping a subscription #29186
Labels
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.
Event Hubs
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
Node reports
MaxListenersExceededWarning
when stopping a subscription with more than 10 partitions.To Reproduce
Steps to reproduce the behavior:
@azure/event-hubs
,@azure/eventhubs-checkpointstore-blob
,@azure/storage-blob
, andws
repro.js
node repro.js
repro.js contents
Expected behavior
No node warnings.
Actual behavior
Node reports a warning:
Screenshots
Console output
Additional context
The warning stems from
rhea-promise
subscribing to the disconnected event for every partition at the same time: https://github.com/amqp/rhea-promise/blob/e37362a3df7ce9661ff6b7f20980a093596963b1/lib/link.ts#L296Related PR (in draft since 2021):
https://github.com/amqp/rhea-promise/pull/78/files
The text was updated successfully, but these errors were encountered: