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

latest releases: Azure.ResourceManager.ComputeSchedule_1.0.0-beta.1, Azure.Communication.Email_1.1.0-beta.2, Azure.Identity_1.12.1...
3 years ago

5.5.0 (2021-07-07)

Acknowledgments

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

Changes

Features Added

  • The EventData type offers a curated set of the information available for messages using the AMQP protocol. While this results in a simpler and more easily understood API surface for an event, it limits interoperability with other message brokers. To support heterogeneous environments or those with specialized needs, the full AMQP message is now available using the GetRawAmqpMessage method. (Based on a community prototype contribution, courtesy of danielmarbach)

  • EventData now supports construction using a string to specify the event body; this will be represented as a set of UTF-8 encoded bytes for transport.

  • EventData has been extended to include properties for applications to assign a MessageId, ContentType, and CorrelationId as well-known members rather than embedding them in the Properties dictionary. It is important to note that these properties are intended for application use and are not recognized by the Event Hubs service.

  • When stopping, the EventProcessor<TPartition> will now attempt to force-close the connection to the Event Hubs service to abort in-process read operations blocked on their timeout. This should significantly help reduce the amount of time the processor takes to stop in many scenarios. (Based on a community prototype contribution, courtesy of danielmarbach)

  • When the EventProcessor<TPartition> detects a partition being stolen outside of a load balancing cycle, it will immediately surrender ownership rather than waiting for a load balancing cycle to confirm the ownership change. This will help reduce event duplication from overlapping ownership of processors.

  • The EventProcessor<TPartition> now exposes the ListPartitionIdsAsync method, allowing custom processors to control the set of partitions known to the processor. This can be used to reduce complexity when a custom processor is directly assigned a set of partitions to process rather than using load balancing to control ownership.

  • The ConnectionOptions available when creating client types now support registering a callback delegate for participating in the validation of SSL certificates when connections are established. This delegate may override the built-in validation and allow or deny certificates based on application-specific logic.

  • The ConnectionOptions available when creating client types now support setting a custom size for the send and receive buffers of the transport.

  • Additional verbose logging has been added to allow monitoring of lower-level AMQP operations such as creating links, terminal exceptions that fault a link without an active operation, and when the service force-closes links.

Key Bugs Fixed

  • The EventProcessor<TPartition> will now properly respect another another consumer stealing ownership of a partition when the service forcibly terminates the active link in the background. Previously, the client did not observe the error directly and attempted to recover the faulted link which reasserted ownership and caused the partition to "bounce" between owners until a load balancing cycle completed.

  • The EventProcessor<TPartition> will now be less aggressive when considering whether or not to steal a partition, doing so only when it will correct an imbalance and preferring the status quo when the overall distribution would not change. This will help reduce event duplication due to partitions moving between owners.

  • The EventHubConsumerClient and PartitionReceiver will now properly surface an exception when another another consumer stealing ownership of a partition when the service forcibly terminates the active link in the background. Previously, the client did not observe the error directly and did not make callers attempted to recover the faulted link which reasserted ownership and caused the partition to "bounce" between owners until a load balancing cycle completed.

  • The retry policy used by clients will no longer overflow the TimeSpan maximum when using an Exponential strategy with a large number of retries and long delay set.

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

NewReleases is sending notifications on new releases.