-
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
[WIP][event-hubs] EventHubBufferedProducerClient implementation #18106
[WIP][event-hubs] EventHubBufferedProducerClient implementation #18106
Conversation
…dle connection timeout watchers
…ressure to EventHubBufferedProducerClient
if (this.getCurrentBufferedCount() === 0) { | ||
return Promise.resolve(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: this seems to be the base case so I would prefer to move it up for readability.
} else if (!didAdd) { | ||
// Handles the case where the event _was_ successfull added to the new batch. | ||
this._batchedEvents.push(event); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand this case. If it was not added to batch
, why is it being added to _batchedEvents
here?
* [event-hubs] EventHubsBufferedProducerClient skeleton (#17761) * temp transfer * [event-hubs] initial EventHubBufferedProducerClient skeleton * Change default value of BufferedCloseOptions.flush to true instead of false * Reorder doc comment content for EventHubBufferedProducerClient * remove eslint exception for @azure/azure-sdk/ts-naming-options in EventHubBufferedProducerClientOptions * add enqueueEvent (singular) method * update API view * [WIP][event-hubs] EventHubBufferedProducerClient implementation (#18106) * transfer * [mock-hub] fix issue where calling stop() would not remove existing idle connection timeout watchers * [event-hubs] reduce repetition in hubruntime.spec.ts tests * Add support for flush,eventSuccess and eventError handlers, and backpressure to EventHubBufferedProducerClient * add documentation and update API to align with .NET * [Buffered Event Hubs Producer] Implements Parition Key to Partition ID mapping (#18331) * [Buffered Event Hubs Producer] Implements Parition Key to Partition ID mapping * fix the implementation * factor out the hashing logic * remove unused import * the test pass but the implementation needs to be simplified * simplified implementation * address feedback * address feedback * fix format * address feedback Co-authored-by: chradek <[email protected]>
* Removing return response for Pause/Resume/Stop recording * Removing validations * Fixes after merge * Added downloadToFile operation * Added downloadToFile test * Updating API MD file * Fixing format auto * Renaming files * [KeyVault] - Move MHSM to resource group location (#18664) Moving the Managed HSM to the same location as our resource group now that the limits have been expanded. * Add default cloud configuration values to source (#18653) Co-authored-by: Ben Broderick Phillips <[email protected]> * simplify the commit history so that the patch can apply properly (#18665) Co-authored-by: scbedd <[email protected]> * Updating name for header * [Event Hubs] Merge feature branch for buffered producer (#18590) * [event-hubs] EventHubsBufferedProducerClient skeleton (#17761) * temp transfer * [event-hubs] initial EventHubBufferedProducerClient skeleton * Change default value of BufferedCloseOptions.flush to true instead of false * Reorder doc comment content for EventHubBufferedProducerClient * remove eslint exception for @azure/azure-sdk/ts-naming-options in EventHubBufferedProducerClientOptions * add enqueueEvent (singular) method * update API view * [WIP][event-hubs] EventHubBufferedProducerClient implementation (#18106) * transfer * [mock-hub] fix issue where calling stop() would not remove existing idle connection timeout watchers * [event-hubs] reduce repetition in hubruntime.spec.ts tests * Add support for flush,eventSuccess and eventError handlers, and backpressure to EventHubBufferedProducerClient * add documentation and update API to align with .NET * [Buffered Event Hubs Producer] Implements Parition Key to Partition ID mapping (#18331) * [Buffered Event Hubs Producer] Implements Parition Key to Partition ID mapping * fix the implementation * factor out the hashing logic * remove unused import * the test pass but the implementation needs to be simplified * simplified implementation * address feedback * address feedback * fix format * address feedback Co-authored-by: chradek <[email protected]> * [Event Hubs] Prepare release (#18672) * [Event Hubs] Prepare release * remove empty sections * Node doesn't support some samples for smoke test (#18496) * Node doesn't support some samples for smoke test * [search-documents] reprocessed samples with exp. generator Co-authored-by: Will Temple <[email protected]> * Add rlc quickstart guideline (#18503) * add llc quickstart guideline * update format * add documentation about ci.yml * update to resolve some comments * update to resolve some comments * update to resolve comments * updates term * update format * update format * Running Rush update * Sync eng/common directory with azure-sdk-tools for PR 2265 (#18683) * Improve devops logging for link checker * Update eng/common/scripts/Verify-Links.ps1 Co-authored-by: Wes Haggard <[email protected]> Co-authored-by: Wes Haggard <[email protected]> * Build and test predefined set of packages only in identity pipelines (#18686) * Build and test predefined set of packages only in identity pipelines * Fixing playback testing * Run rushx format Co-authored-by: Maor Leger <[email protected]> Co-authored-by: Azure SDK Bot <[email protected]> Co-authored-by: Ben Broderick Phillips <[email protected]> Co-authored-by: scbedd <[email protected]> Co-authored-by: Deyaaeldeen Almahallawi <[email protected]> Co-authored-by: chradek <[email protected]> Co-authored-by: Sarangan Rajamanickam <[email protected]> Co-authored-by: Will Temple <[email protected]> Co-authored-by: Qiaoqiao Zhang <[email protected]> Co-authored-by: Wes Haggard <[email protected]> Co-authored-by: Wes Haggard <[email protected]> Co-authored-by: praveenkuttappan <[email protected]>
* [KeyVault] - Move MHSM to resource group location (#18664) Moving the Managed HSM to the same location as our resource group now that the limits have been expanded. * Add default cloud configuration values to source (#18653) Co-authored-by: Ben Broderick Phillips <[email protected]> * simplify the commit history so that the patch can apply properly (#18665) Co-authored-by: scbedd <[email protected]> * [Event Hubs] Merge feature branch for buffered producer (#18590) * [event-hubs] EventHubsBufferedProducerClient skeleton (#17761) * temp transfer * [event-hubs] initial EventHubBufferedProducerClient skeleton * Change default value of BufferedCloseOptions.flush to true instead of false * Reorder doc comment content for EventHubBufferedProducerClient * remove eslint exception for @azure/azure-sdk/ts-naming-options in EventHubBufferedProducerClientOptions * add enqueueEvent (singular) method * update API view * [WIP][event-hubs] EventHubBufferedProducerClient implementation (#18106) * transfer * [mock-hub] fix issue where calling stop() would not remove existing idle connection timeout watchers * [event-hubs] reduce repetition in hubruntime.spec.ts tests * Add support for flush,eventSuccess and eventError handlers, and backpressure to EventHubBufferedProducerClient * add documentation and update API to align with .NET * [Buffered Event Hubs Producer] Implements Parition Key to Partition ID mapping (#18331) * [Buffered Event Hubs Producer] Implements Parition Key to Partition ID mapping * fix the implementation * factor out the hashing logic * remove unused import * the test pass but the implementation needs to be simplified * simplified implementation * address feedback * address feedback * fix format * address feedback Co-authored-by: chradek <[email protected]> * [Event Hubs] Prepare release (#18672) * [Event Hubs] Prepare release * remove empty sections * Node doesn't support some samples for smoke test (#18496) * Node doesn't support some samples for smoke test * [search-documents] reprocessed samples with exp. generator Co-authored-by: Will Temple <[email protected]> * Add rlc quickstart guideline (#18503) * add llc quickstart guideline * update format * add documentation about ci.yml * update to resolve some comments * update to resolve some comments * update to resolve comments * updates term * update format * update format * Sync eng/common directory with azure-sdk-tools for PR 2265 (#18683) * Improve devops logging for link checker * Update eng/common/scripts/Verify-Links.ps1 Co-authored-by: Wes Haggard <[email protected]> Co-authored-by: Wes Haggard <[email protected]> * Build and test predefined set of packages only in identity pipelines (#18686) * Build and test predefined set of packages only in identity pipelines * Removed raw response from ContentDownloadResponse * Changing name to RepeatanleContentDownloadResult * Changed name to ContentDownloadResult * Fixes after merging Co-authored-by: Maor Leger <[email protected]> Co-authored-by: Azure SDK Bot <[email protected]> Co-authored-by: Ben Broderick Phillips <[email protected]> Co-authored-by: scbedd <[email protected]> Co-authored-by: Deyaaeldeen Almahallawi <[email protected]> Co-authored-by: chradek <[email protected]> Co-authored-by: Sarangan Rajamanickam <[email protected]> Co-authored-by: Will Temple <[email protected]> Co-authored-by: Qiaoqiao Zhang <[email protected]> Co-authored-by: Wes Haggard <[email protected]> Co-authored-by: Wes Haggard <[email protected]> Co-authored-by: praveenkuttappan <[email protected]>
Currently a WIP.
Status report:
EventHubBufferedProducerClient.enqueueEvent()
EventHubBufferedProducerClient.enqueueEvents()
EventHubBufferedProducerClient.flush()
EventHubBufferedProducerClient.close()
with flush flag.EventHubBufferedProducerClient.enqueueEvent[s]()
when buffer is full.onSendEventsSuccessHandler
when events are successfully sent to service.onSendEventsErrorHandler
when events error when sending to service.enqueue
calls.abortSignal
optimizations - all async methods should respect theabortSignal
Some tests have been written to test back-pressure and enqueueEvent.