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:
- Daniel Marbach (GitHub)
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 concreteCheckpointStore
implementations. -
An abstract
CheckpointStore
is now available for use with thePluggableCheckpointStoreEventProcessor<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
, andConsumerGroup
to the partition context associated with events read by theEventHubConsumerClient
.
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 toobject[]
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>
toAsList<T>
in order to avoid casting costs and haveCount
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 itsToString
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 theEventBody
to be set after construction and supports an empty constructor.