Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify the header prefix of eventhubs #27746

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 70 additions & 6 deletions sdk/spring/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,35 @@ This section includes changes in `spring-cloud-azure-stream-binder-servicebus` m
- Change property from `spring.cloud.stream.servicebus.bindings.<binding-name>.consumer.session-aware` to `spring.cloud.stream.servicebus.bindings.<binding-name>.consumer.session-enabled` [#27331](https://github.com/Azure/azure-sdk-for-java/pull/27331).
- Unify the root package name of Spring libraries. [#27420](https://github.com/Azure/azure-sdk-for-java/pull/27420).
- Remove message header of `AzureHeaders.RAW_ID`. Please use `ServiceBusMessageHeaders.MESSAGE_ID` instead [#27675](https://github.com/Azure/azure-sdk-for-java/pull/27675).

- Change the property of `spring.cloud.stream.servicebus.bindings.<binding-name>.consumer.checkpoint-mode` to `spring.cloud.stream.servicebus.bindings.<binding-name>.consumer.auto-complete`.
To disable the auto-complete mode is equivalent to `MANUAL` checkpoint mode and to enable it will trigger the `RECORD` mode [#27646](https://github.com/Azure/azure-sdk-for-java/pull/27646).


#### Features Added
- Support converting all headers and properties exposed directly by `ServiceBusReceivedMessage` when receiving messages [#27675](https://github.com/Azure/azure-sdk-for-java/pull/27675), newly supported headers and properties can be get according to the keys of:
* ServiceBusMessageHeaders.DEAD_LETTER_ERROR_DESCRIPTION
* ServiceBusMessageHeaders.DEAD_LETTER_REASON
* ServiceBusMessageHeaders.DEAD_LETTER_SOURCE
* ServiceBusMessageHeaders.DELIVERY_COUNT
* ServiceBusMessageHeaders.ENQUEUED_SEQUENCE_NUMBER
* ServiceBusMessageHeaders.ENQUEUED_TIME
* ServiceBusMessageHeaders.EXPIRES_AT
* ServiceBusMessageHeaders.LOCK_TOKEN
* ServiceBusMessageHeaders.LOCKED_UNTIL
* ServiceBusMessageHeaders.SEQUENCE_NUMBER
* ServiceBusMessageHeaders.STATE
* ServiceBusMessageHeaders.SUBJECT
- Support the message header of `ServiceBusMessageHeaders.SUBJECT` to specify the AMQP property of `subject` when sending messages [#27675](https://github.com/Azure/azure-sdk-for-java/pull/27675).

### Spring Cloud Azure Starter Integration Service Bus
This section includes changes in the `spring-cloud-azure-starter-integration-servicebus` module.

#### Breaking Changes
- Remove message header of `AzureHeaders.RAW_ID`. Please use `ServiceBusMessageHeaders.MESSAGE_ID` instead [#27675](https://github.com/Azure/azure-sdk-for-java/pull/27675).
- Drop class `CheckpointConfig`. To set the checkpoint configuration for `ServiceBusInboundChannelAdapter`,
users can call the method `ServiceBusContainerProperties#setAutoComplete` instead. To disable the auto-complete mode is
equivalent to `MANUAL` checkpoint mode and to enable it will trigger the `RECORD` mode [#27646](https://github.com/Azure/azure-sdk-for-java/pull/27646).

#### Features Added
- Support converting all headers and properties exposed directly by `ServiceBusReceivedMessage` when receiving messages [#27675](https://github.com/Azure/azure-sdk-for-java/pull/27675), newly supported headers and properties can be get according to the keys of:
* ServiceBusMessageHeaders.DEAD_LETTER_ERROR_DESCRIPTION
Expand All @@ -38,11 +66,15 @@ This section includes changes in `spring-cloud-azure-stream-binder-servicebus` m
* ServiceBusMessageHeaders.SUBJECT
- Support the message header of `ServiceBusMessageHeaders.SUBJECT` to specify the AMQP property of `subject` when sending messages [#27675](https://github.com/Azure/azure-sdk-for-java/pull/27675).

### Spring Integration Service Bus Starter
### Spring Integration Azure Service Bus
This section includes changes in the `spring-integration-azure-servicebus` module.

#### Breaking Changes
- Remove message header of `AzureHeaders.RAW_ID`. Please use `ServiceBusMessageHeaders.MESSAGE_ID` instead [#27675](https://github.com/Azure/azure-sdk-for-java/pull/27675).

- Drop class `CheckpointConfig`. To set the checkpoint configuration for `ServiceBusInboundChannelAdapter`,
users can call the method `ServiceBusContainerProperties#setAutoComplete` instead. To disable the auto-complete mode is
equivalent to `MANUAL` checkpoint mode and to enable it will trigger the `RECORD` mode [#27646](https://github.com/Azure/azure-sdk-for-java/pull/27646).

#### Features Added
- Support converting all headers and properties exposed directly by `ServiceBusReceivedMessage` when receiving messages [#27675](https://github.com/Azure/azure-sdk-for-java/pull/27675), newly supported headers and properties can be get according to the keys of:
* ServiceBusMessageHeaders.DEAD_LETTER_ERROR_DESCRIPTION
Expand All @@ -64,6 +96,19 @@ This section includes changes in `spring-cloud-azure-stream-binder-eventhubs` mo

#### Breaking Changes
- Change the type of the binding producer property of `send-timeout` from `long` to `Duration` [#26625](https://github.com/Azure/azure-sdk-for-java/pull/26625).
- Change the message header prefix from `azure_eventhub` to `azure_eventhubs_` [#27746](https://github.com/Azure/azure-sdk-for-java/pull/27746).

### Spring Cloud Azure Starter Integration Event Hubs
This section includes changes in the `spring-cloud-azure-starter-integration-eventhubs` module.

#### Breaking Changes
- Change the message header prefix from `azure_eventhub` to `azure_eventhubs_` [#27746](https://github.com/Azure/azure-sdk-for-java/pull/27746).
saragluna marked this conversation as resolved.
Show resolved Hide resolved

### Spring Integration Azure Event Hubs
This section includes changes in the `spring-integration-azure-eventhubs` module.

#### Breaking Changes
- Change the message header prefix from `azure_eventhub` to `azure_eventhubs_` [#27746](https://github.com/Azure/azure-sdk-for-java/pull/27746).

### Spring Cloud Azure Event Hubs Starter
This section includes changes in `spring-cloud-azure-starter-eventhubs` module.
Expand All @@ -83,12 +128,30 @@ This section includes changes in `spring-cloud-azure-starter-eventhubs` module.
- Change class from `com.azure.spring.messaging.PartitionSupplier` to `com.azure.spring.messaging.eventhubs.core.PartitionSupplier` [#27422](https://github.com/Azure/azure-sdk-for-java/issues/27422).
- Remove parameter of `PartitionSupplier` from the sending API for a single message in `EventHubsTemplate`.
Please use message headers of `com.azure.spring.messaging.AzureHeaders.PARTITION_ID` and `com.azure.spring.messaging.AzureHeaders.PARTITION_KEY` instead [#27422](https://github.com/Azure/azure-sdk-for-java/issues/27422).
- Change the message header prefix from `azure_eventhub` to `azure_eventhubs_` [#27746](https://github.com/Azure/azure-sdk-for-java/pull/27746).
saragluna marked this conversation as resolved.
Show resolved Hide resolved

### Spring Messaging Azure Service Bus

#### Breaking Changes
- Remove parameter of `PartitionSupplier` from the sending API for a single message in `ServiceBusTemplate`.
Please use message header of `com.azure.spring.messaging.AzureHeaders.PARTITION_KEY` instead [#27422](https://github.com/Azure/azure-sdk-for-java/issues/27422).
- Remove message header of `AzureHeaders.RAW_ID`. Please use `ServiceBusMessageHeaders.MESSAGE_ID` instead [#27675](https://github.com/Azure/azure-sdk-for-java/pull/27675).

#### Features Added
- Support converting all headers and properties exposed directly by `ServiceBusReceivedMessage` when receiving messages [#27675](https://github.com/Azure/azure-sdk-for-java/pull/27675), newly supported headers and properties can be get according to the keys of:
* ServiceBusMessageHeaders.DEAD_LETTER_ERROR_DESCRIPTION
* ServiceBusMessageHeaders.DEAD_LETTER_REASON
* ServiceBusMessageHeaders.DEAD_LETTER_SOURCE
* ServiceBusMessageHeaders.DELIVERY_COUNT
* ServiceBusMessageHeaders.ENQUEUED_SEQUENCE_NUMBER
* ServiceBusMessageHeaders.ENQUEUED_TIME
* ServiceBusMessageHeaders.EXPIRES_AT
* ServiceBusMessageHeaders.LOCK_TOKEN
* ServiceBusMessageHeaders.LOCKED_UNTIL
* ServiceBusMessageHeaders.SEQUENCE_NUMBER
* ServiceBusMessageHeaders.STATE
* ServiceBusMessageHeaders.SUBJECT
- Support the message header of `ServiceBusMessageHeaders.SUBJECT` to specify the AMQP property of `subject` when sending messages [#27675](https://github.com/Azure/azure-sdk-for-java/pull/27675).

### Spring Messaging Azure Storage Queue

Expand Down Expand Up @@ -257,6 +320,7 @@ Please refer to [Spring Cloud Azure Migration Guide for 4.0][Spring-Cloud-Azure-
- Change artifact id from `azure-spring-cloud-starter-eventhubs` to
`spring-cloud-azure-starter-integration-eventhubs`.
- Annotation of `@AzureMessageListeners`, `@AzureMessageListener` and `@EnableAzureMessaging` are dropped.
- Drop `RxJava` support of `EventHubRxOperation` and `EventHubRxTemplate` and support `Reactor` only.
- Drop `EventHubOperation`, and move its `subscribe` API to class of `EventHubsProcessorContainer`.
- Rename `EventHubsInboundChannelAdapter` as `EventHubsInboundChannelAdapter` to keep consistent with the service of
Azure
Expand All @@ -271,6 +335,7 @@ Please refer to [Spring Cloud Azure Migration Guide for 4.0][Spring-Cloud-Azure-
- Change artifact id from `azure-spring-integration-eventhubs` to
`spring-integration-azure-eventhubs`.
- Annotation of `@AzureMessageListeners`, `@AzureMessageListener` and `@EnableAzureMessaging` are dropped.
- Drop `RxJava` support of `EventHubRxOperation` and `EventHubRxTemplate` and support `Reactor` only.
- Drop `EventHubOperation`, and move its `subscribe` API to class of `EventHubsProcessorContainer`.
- Rename `EventHubsInboundChannelAdapter` as `EventHubsInboundChannelAdapter` to keep consistent with the service of
Azure
Expand All @@ -283,9 +348,8 @@ Please refer to [Spring Cloud Azure Migration Guide for 4.0][Spring-Cloud-Azure-
#### Breaking Changes

- Change artifact id from `azure-spring-cloud-starter-servicebus` to `spring-cloud-azure-starter-integration-servicebus`.
- Annotation of `@AzureMessageListeners`, `@AzureMessageListener` and `@EnableAzureMessaging` are dropped.
- Combine the original `ServiceBusQueueTemplate#sendAsync` and `ServiceBusTopicTemplate#sendAsync` as `ServiceBusTemplate#sendAsync` and drop classes of `ServiceBusQueueTemplate` and `ServiceBusTopicTemplate`.
- Drop `RxJava` and `CompletableFuture` support of ServiceBusTemplate and support `Reactor` instead.
- Drop `CompletableFuture` support of ServiceBusTemplate and support `Reactor` instead.
- Drop interface of `ServiceBusQueueOperation` and `ServiceBusTopicOperation`.
- Drop API of `ServiceBusQueueOperation#abandon` and `ServiceBusQueueOperation#deadletter`.
- Combine the original `ServiceBusQueueTemplate#subscribe` and `ServiceBusTopicTemplate#subscribe` as `ServiceBusProcessorClient#subscribe`.
Expand All @@ -304,7 +368,7 @@ Please refer to [Spring Cloud Azure Migration Guide for 4.0][Spring-Cloud-Azure-

- Change artifact id from `azure-spring-integration-servicebus` to `spring-integration-azure-servicebus`.
- Combine the original `ServiceBusQueueTemplate#sendAsync` and `ServiceBusTopicTemplate#sendAsync` as `ServiceBusTemplate#sendAsync` and drop classes of `ServiceBusQueueTemplate` and `ServiceBusTopicTemplate`.
- Drop `RxJava` and `CompletableFuture` support of ServiceBusTemplate and support `Reactor` instead.
- Drop and `CompletableFuture` support of ServiceBusTemplate and support `Reactor` instead.
- Drop interface of `ServiceBusQueueOperation` and `ServiceBusTopicOperation`.
- Drop API of `ServiceBusQueueOperation#abandon` and `ServiceBusQueueOperation#deadletter`.
- Combine the original `ServiceBusQueueTemplate#subscribe` and `ServiceBusTopicTemplate#subscribe` as `ServiceBusProcessorClient#subscribe`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ private EventHubsHeaders() {

}

private static final String PREFIX = AzureHeaders.PREFIX + "eventhub_";
private static final String PREFIX = AzureHeaders.PREFIX + "eventhubs_";

public static final String ENQUEUED_TIME = PREFIX + "enqueued_time";
public static final String BATCH_CONVERTED_ENQUEUED_TIME = PREFIX + "batch_converted_enqueued_time";
Expand Down