github Azure/azure-sdk-for-net Azure.Messaging.EventHubs_5.7.0

latest releases: Azure.ResourceManager.Dns_1.2.0-beta.1, Microsoft.Azure.WebJobs.Extensions.SignalRService_1.14.0, Microsoft.Azure.WebJobs.Extensions.ServiceBus_5.16.0...
2 years ago

5.7.0 (2022-05-10)

Acknowledgments

Thank you to our developer community members who helped to make the Event Hubs client libraries better with their contributions to this release:

Features Added

  • The EventHubBufferedProducerClient is being introduced, intended to allow for efficient publishing of events without having to explicitly manage batches in the application. More information can be found in its design document.
    (Thanks to danielmarbach for his contributions to the implementation)

  • An additional base class for event processors, PluggableCheckpointStoreEventProcessor<T>, has been added to simplify creating customized event processors and integrate with concrete CheckpointStore implementations.

  • An abstract CheckpointStore is now available for use with the PluggableCheckpointStoreEventProcessor<T> to simplify creating customized event processors and allow reusing existing checkpoint store implementations.

  • Support for cancellation tokens has been improved for AMQP operations, enabling earlier detection of cancellation requests without needing to wait for the configured timeout to elapse.

  • Added FullyQualifiedNamespace, EventHubName, and ConsumerGroup to the partition context associated with events read by the EventHubConsumerClient.

Other Changes

  • Based on a new series of profiling and testing in real-world application scenarios, the default values for EventProcessor<T> load balancing have been updated to provide better performance and stability. The default load balancing interval was changed from 10 seconds to 30 seconds. The default ownership expiration interval was changed from 30 seconds to 2 minutes. The default load balancing strategy has been changed from balanced to greedy.

  • Added additional heuristics for the EventProcessor<T> load balancing cycle to help discover issues that can impact processor performance and stability; these validations will produce warnings should potential concerns be found.

  • EventProcessor<T> will now log a verbose message indicating what event position was chosen to read from when initializing a partition.

  • Removed allocations from Event Source logging by introducing WriteEvent overloads to handle cases that would otherwise result in boxing to object[] via params array. (A community contribution, courtesy of danielmarbach)

  • Removed LINQ from the AmqpMessageConverter in favor of direct looping. (Based on a community contribution, courtesy of danielmarbach)

  • Changed the internal batch AsEnumerable<T> to AsList<T> in order to avoid casting costs and have Count available to right-size transform collections. (Based on a community contribution, courtesy of danielmarbach)

  • Moved to using the two item overload when creating a linked token source to avoid allocating an unnecessary array. (Based on a community contribution, courtesy of danielmarbach)

  • Attempts to retrieve AMQP objects will first try synchronously before calling GetOrCreateAsync, to avoid an asynchronous call unless necessary.

  • Improved documentation for EventPosition to be more explicit about defaults for inclusivity.

  • EventPosition now exposes its ToString method for code completion, making it more discoverable.

  • Minor updates to the class hierarchy of EventData to improve integration with Azure Schema Registry.

  • EventData now allows the EventBody to be set after construction and supports an empty constructor.

Don't miss a new azure-sdk-for-net release

NewReleases is sending notifications on new releases.