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

latest releases: Azure.Search.Documents_11.7.0-beta.7, Azure.AI.Agents.Persistent_1.2.0-beta.4, Azure.Provisioning.Kusto_1.0.0-beta.1...
5 months ago

5.12.0 (2025-04-08)

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

  • Support for the Event Hubs geographic data replication feature has been enabled. Checking for whether or not this feature is enabled for your namespace can be done by querying for Event Hub properties using EventHubProducerClient or EventHubConsumerClient and referencing the the IsGeoReplicationEnabled property of the result.

    As part of this feature, the type of offset-related data has been changed from long to string to align with changes to the Event Hubs service API. To preserve backwards compatibility, the existing offset-related members have not been changed, and new members with names similar to OffsetString and string-based parameters for method overloads have been introduced.

    The long-based offset members will continue to work for Event Hubs namespaces that do not have GeoDR replication enabled, but are discouraged for use and have been marked as obsolete.

    Obsoleted properties:

    • EventData.Offset
    • LastEnqueuedEventProperties.Offset
    • PartitionProperties.LastEnqueuedOffset

    Obsoleted method overloads:

    • EventPosition.FromOffset
    • EventHubsModelFactory.EventData
    • BlobCheckpointStore.UpdateCheckpointAsync
    • EventProcessorClient.UpdateCheckpointAsync

Bugs Fixed

  • Querying runtime data and other management operations will now correctly guards against the race condition where an AMQP link is in the process of closing as the operation attempts to use it. These errors will now properly be classified as retriable as they are for producer and consumer operations.

  • Fixed an obscure edge case in the EventHubBufferedProducer client where an unlikely race condition when flushing/enqueuing events concurrently with disposing the producer could cause a semaphore to be released inappropriately. This error superseded the TaskCanceledException that should have been surfaced.

Other Changes

  • Enhanced retry logic to consider additional cases for web socket-based failures. In many cases, a WebSocketException is triggered which wraps a SocketException with the details for the specific network conditions. Retry decisions are now based on the internal exception, if present, to ensure retries are correctly applied.

  • Added annotations to make the package compatible with trimming and native AOT compilation.

  • Added Event Hub name to processor load balancing logs for additional context. (A community contribution, courtesy of tovyhnal)

  • Updated the Microsoft.Azure.Amqp dependency to 2.6.9, which contains several bug fixes. (see: commits)

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

NewReleases is sending notifications on new releases.