Skip to content

Commit

Permalink
[Event Hubs Client] AMQP Translation for Full Message (#22247)
Browse files Browse the repository at this point in the history
The focus of these changes is to refactor the `AmqpMessageConverter` to
perform translation based on the full `AmqpAnnotatedMessage` rather than
the `EventData` projection, as had previously been done.
  • Loading branch information
jsquire authored Jun 28, 2021
1 parent 250da8e commit 3c2fd89
Show file tree
Hide file tree
Showing 10 changed files with 1,341 additions and 259 deletions.
55 changes: 39 additions & 16 deletions sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

## 5.5.0-beta.2 (Unreleased)

### 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](https://github.com/danielmarbach))_

### Changes

#### Features Added

- When stopping, the `EventProcessorClient` 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](https://github.com/danielmarbach))_

- When the `EventProcessorClient` 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 `ConnectionOptions` available when creating a processor 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 a processor now support setting a custom size for the send and receive buffers of the transport.

#### Key Bugs Fixed

- The `EventProcessorClient` 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 `EventProcessorClient` 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.

## 5.5.0-beta.1 (2021-06-08)

Expand All @@ -13,7 +36,7 @@ Thank you to our developer community members who helped to make the Event Hubs c

### Changes

#### New Features
#### Features Added

- When stopping, the `EventProcessorClient` 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](https://github.com/danielmarbach))_

Expand All @@ -23,7 +46,7 @@ Thank you to our developer community members who helped to make the Event Hubs c

- The `ConnectionOptions` available when creating a processor now support setting a custom size for the send and receive buffers of the transport.

#### Key Bug Fixes
#### Key Bugs Fixed

- The `EventProcessorClient` 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.

Expand All @@ -33,13 +56,13 @@ Thank you to our developer community members who helped to make the Event Hubs c

### Changes

#### New Features
#### Features Added

- The processor will now perform validation of core configuration and permissions at startup, in order to attempt to detect unrecoverable problems more deterministically. Validation is non-blocking and will not delay claiming of partitions. One important note is that validation should be considered point-in-time and best effort; it is not meant to replace monitoring of error handler activity.

- Partition initialization has been moved to a background operation. This will allow partitions to be more efficiently managed and speed up ownership claims, especially when using the `LoadBalancingStrategy.Greedy` configuration or when the processor is recovering from some error conditions.

#### Key Bug Fixes
#### Key Bugs Fixed

- Dependencies have been updated to resolve security warnings for CVE-2021-26701. _(The Event Hubs client library does not make use of the vulnerable components, directly or indirectly)_

Expand All @@ -55,13 +78,13 @@ Thank you to our developer community members who helped to make the Event Hubs c

### Changes

#### New Features
#### Features Added

- The `EventProcessorClient` now supports shared key and shared access signature authentication using the `AzureNamedKeyCredential` and `AzureSasCredential` types in addition to the connection string. Use of the credential allows the shared key or SAS to be updated without the need to create a new processor.

- Multiple enhancements were made to the AMQP transport paths for reading events to reduce memory allocations and increase performance. _(A community contribution, courtesy of [danielmarbach](https://github.com/danielmarbach))_

#### Key Bug Fixes
#### Key Bugs Fixed

- The AMQP library used for transport has been updated, fixing several issues including a potential unobserved `ObjectDisposedException` that could cause the host process to crash. _(see: [release notes](https://github.com/Azure/azure-amqp/releases/tag/v2.4.13))_

Expand All @@ -75,7 +98,7 @@ Thank you to our developer community members who helped to make the Event Hubs c

### Changes

#### Key Bug Fixes
#### Key Bugs Fixed

- Fixed an issue where long-lived credentials (more than 49 days) were overflowing refresh timer limits and being rejected.

Expand All @@ -89,7 +112,7 @@ Thank you to our developer community members who helped to make the Event Hubs c

### Changes

#### New Features
#### Features Added

- Additional options for tuning load balancing have been added to the `EventProcessorClientOptions`.

Expand All @@ -101,7 +124,7 @@ Thank you to our developer community members who helped to make the Event Hubs c

- Documentation used for auto-completion via Intellisense and other tools has been enhanced in many areas, addressing gaps and commonly asked questions.

#### Key Bug Fixes
#### Key Bugs Fixed

- Upgraded the `Microsoft.Azure.Amqp` library to resolve crashes occurring in .NET 5.

Expand All @@ -111,13 +134,13 @@ Thank you to our developer community members who helped to make the Event Hubs c

### Changes

#### New Features
#### Features Added

- Additional options for tuning load balancing have been added to the `EventProcessorClientOptions`.

- Documentation used for auto-completion via Intellisense and other tools has been enhanced in many areas, addressing gaps and commonly asked questions.

#### Key Bug Fixes
#### Key Bugs Fixed

- Upgraded the `Microsoft.Azure.Amqp` library to resolve crashes occurring in .NET 5.

Expand All @@ -127,15 +150,15 @@ Thank you to our developer community members who helped to make the Event Hubs c

### Changes

#### Key Bug Fixes
#### Key Bugs Fixed

- An issue with package publishing which blocked referencing and use has been fixed.

## 5.3.0-beta.2 (2020-09-28)

### Changes

#### New Features
#### Features Added

- The `EventData` representation has been extended with the ability to treat the `Body` as `BinaryData`. `BinaryData` supports a variety of data transformations and allows the ability to provide serialization logic when sending or receiving events. Any type that derives from `ObjectSerializer`, such as `JsonObjectSerializer` can be used, with Schema Registry support available via the `SchemaRegistryAvroObjectSerializer`.

Expand All @@ -147,7 +170,7 @@ Thank you to our developer community members who helped to make the Event Hubs c

### Changes

#### New Features
#### Features Added

- Introduction of an option for the various event consumers allowing the prefetch cache to be filled based on a size-based heuristic rather than a count of events. This feature is considered a special case, helpful in scenarios where the size of events being read is not able to be known or predicted upfront and limiting resource use is valued over consistent and predictable performance.

Expand All @@ -161,15 +184,15 @@ Thank you to our developer community members who helped to make the Event Hubs c

### Changes

#### Key Bug Fixes
#### Key Bugs Fixed

- The approach used for creation of checkpoints has been updated to interact with Azure Blob storage more efficiently. This will yield major performance improvements when soft delete was enabled and minor improvements otherwise.

- The `EventProcessorClient` will now perform an eager validation of connection strings upon creation. Previously, validation was deferred until a partition was claimed which made debugging difficult.

- Fixed an issue where failure to create an AMQP link would lead to an AMQP session not being explicitly closed, causing connections to the Event Hubs service to remain open until a garbage collection pass was performed.

#### New Features
#### Features Added

- Load balancing will now detect when it has reached a balanced state more accurately; this will allow it to operate more efficiently when `LoadBalancingStrategy.Greedy` is in use.

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -309,4 +309,10 @@
<data name="DictionaryKeyNotFoundMask" xml:space="preserve">
<value>The given key '{0}' was not present in the dictionary.</value>
</data>
<data name="InvalidAmqpMessageValueBodyMask" xml:space="preserve">
<value>{0} is not a supported value body type.</value>
</data>
<data name="InvalidAmqpMessageDictionaryTypeMask" xml:space="preserve">
<value>The {0} key `{1}` has a value of type `{2}` which is not supported for AMQP transport.</value>
</data>
</root>
Loading

0 comments on commit 3c2fd89

Please sign in to comment.