-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EventHubs] Port idempotent Publishing support from feature branch (#…
…20156) * Cherry-Pick 2e45f32 from feature/event-hubs-idempotent-producer [event-hubs] idempotent producer support (#14100) * [event-hubs] adds EventHubProducerClientOptions and enableIdempotentPartitions field to options * [event-hubs] enforces specifying partitionId and ommitting partitionKey when EventHubProducerClient has idempotent partitions enabled. * [event-hubs] idempotent producer enforces 1 concurrent send per partition * [event-hubs] set com.microsoft:idempotent-producer desired capability on sender link when idempotent partitions is enabled * [event-hubs] add getPartitionPublishingProperties method to EventHubProducerClient * [event-hubs] cache partition publisher properties on EventHubSender * [event-hubs] support updating event data with idempotent properties while sending events * [event-hubs] update package version to 5.5.0-beta.1 * update event-hubs dep in eventhubs-checkpointstore-blob to the beta version * adds partitionOptions to EventHubProducerClientOptions so users can specify their own idempotent publishing state * idempotent producer maintains state between reconnects * add tests for EventDataBatch.startingPublishedSequenceNumber * commit published sequence number to EventData user passes in * support user specifying partial partitionOptions and SequenceOutOfOrder errors * throws error if user attempts to send an already published EventDataBatch of EventData[] * appease ci for eventhubs-checkpointstore-blob * remove eslint comments, change "while" to "when" in error messages, and remove code snippet * updates idempotent error message when at least some events are published to be more accurate * centralize partition setting validation * extract extractPartitionAssignment+ methods into their own functions * improve comment around tracingProperties in sendBatch * update documentation for PartitionPublishingOptions and PartitionPublishingProperties * extract some functions out and write tests! * update tests with new validation error messages * Rename the idempotent publish test file for now. * Move new options properties into buffered producer client * Account for the newly added `getRawAmqpMessage()` which is not required for idempotent publishing * Remove redundant encode() call that has been done in toRheaMessage() * Adapt to EventHubSenderOptions change * React to EventDataBatchImpl change * opentelemetry => core-tracing * Move the test file back * Move idempotent publishing test to internal and make it build. private options are set after casting the producer client to any * Port idempotent publishing code from feature/event-hubs-idempotent-producer and remove `generateEventTraceProperty()` that is no longer needed because `instrumentEventData()` already sets the properties. * Update api.md * Hook up buffered producer's idempotent publishing options with the internal standard producer * Add a test for idempotent publishing options * Expose `getPartitionPublishingProperties()` on buffered producer instead * Update CHANGELOG * Remove unused EventHubProducerClientOptions * Remove CHANGELOG entry as this is an advanced scenario * Make PartitionPublishingOptions and PartitionPublishingProperties private * Hide internal properties that we don't want to surface Co-authored-by: chradek <[email protected]>
- Loading branch information
1 parent
521a3be
commit 6b7e478
Showing
18 changed files
with
2,019 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.