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

latest releases: Azure.AI.OpenAI_2.0.0, Microsoft.Azure.WebJobs.Extensions.WebPubSubForSocketIO_1.0.0-beta.4, Azure.Maps.Search_2.0.0-beta.4...
7 months ago

5.11.0 (2024-02-13)

Features Added

  • Added a CheckpointPosition struct to Azure.Messaging.EventHubs.Processor to use when updating a checkpoint. The specified position indicates that an event processor should begin reading from the next event. Added new UpdateCheckpointAsync overloads to CheckpointStore, PluggableCheckpointStoreEventProcessor<TPartition and EventProcessor<TPartition> that accept the CheckpointPosition struct instead of individual values for offset and sequence number.

Breaking Changes

  • The type of several existing values in the EventData.SystemProperties collection have been changed so that they are properly represented as .NET string types. Previously, the underlying AMQP types were unintentionally returned, forcing callers to call ToString() to read the value.

    This is a behavioral breaking change that will impacts only those callers who were explicitly casting system property values to AmqpAddress or AmqpMessageId before calling ToString(). The affected system properties are:

    • MessageId
    • CorrelationId
    • To
    • ReplyTo
  • The base implementations of both UpdateCheckpointAsync method overloads in PluggableCheckpointStoreEventProcessor<TPartition> and EventProcessor<TPartition> now choose sequence number over offset when writing a checkpoint and both values are provided. Previously, writing a checkpoint prioritized offset over sequence number. There is no behavioral change for those using the official checkpoint store implementations.

Bugs Fixed

  • Load balancing is no longer blocked when event processing for a lost partition does not honor the cancellation token. Previously, long-running processing could cause delays in load balancing that resulted in ownership not being renewed for all partitions.

  • Adjusted retries to consider an unreachable host address as terminal. Previously, all socket-based errors were considered transient and would be retried.

  • Fixed a race condition that could lead to a synchronization primitive being double-released if IsRunning was called concurrently while starting or stopping an event processor.

  • Fixed an issue with event processor validation where an exception for quota exceeded may inappropriately be surfaced when starting the processor.

  • In the rare case that an event processor's load balancing and health monitoring task cannot recover from an error, it will now properly surrender ownership when processing stops.

  • Reduced the timeout for transient service failures when starting the buffered producer. This ixed an issue where the buffered producer appeared to hang for an extended period of time when starting if it had issues querying Event Hub metadata for the first time.

  • Fixed the logic used to set the TimeToLive value of the AmqpMessageHeader for received messages to be based on the difference of the AbsoluteExpiryTime and CreationTime properties of the AmqpMessageProperties.

Other Changes

  • Updated the Microsoft.Azure.Amqp dependency to 2.6.4, which enables support for TLS 1.3.

  • Removed the custom sizes for the AMQP sending and receiving buffers, allowing the optimized defaults of the host platform to be used. This offers non-trivial performance increase on Linux-based platforms and a minor improvement on macOS. Windows performance remains unchanged as the default and custom buffer sizes are equivalent.

  • Improved efficiency of partition management during load balancing, reducing the number of operations performed and deferring waiting for lost partitions until the processor is stopped or the partition is reclaimed. Allocations were also non-trivially reduced.

  • Improved the approach used by the processor to manage the background tasks for partition processing and load balancing. These tasks are now marked as long-running and have improved error recovery.

  • Initialization of the load balancing task is now performed in the background and will no longer cause delays when starting the processor.

  • Loosened validation for the fully qualified namespace name passed to client constructors. A URI is now also accepted as a valid format. This is intended to improve the experience when using the management library, CLI, Bicep, or ARM template to create the namespace, as they return only an endpoint for the namespace. Previously, callers were responsible for parsing the endpoint and extracting the host name for use with the clients.

  • In the rare case that an event processor's load balancing and health monitoring task cannot recover from an error, the processor now signals the error handler with a wrapped exception that makes clear that processing will terminate. Previously, the source exception was surfaced to the error handler and the impact was not clear.

  • The "Event Receive Completed" log now includes the maximum batch size and wait time that were used for the operation.

  • A new log has been added to capture the end-to-end performance of the cycle to read and process events for a partition owned by an event processor type. This is emitted as a verbose ETW event with the Id 129 and is highly recommended to capture when troubleshooting processor scenarios.

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

NewReleases is sending notifications on new releases.