From 6a14570de2de9c6429ac1e15b9b0f0bc3917fe92 Mon Sep 17 00:00:00 2001 From: Muyao Feng Date: Tue, 22 Mar 2022 18:09:00 +0800 Subject: [PATCH 01/10] change in spring_cloud_azure_starter_servicebus_jms --- docs/src/main/asciidoc/_migration-guide-for-4.0.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc index 624d205a..9b08933a 100644 --- a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc +++ b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc @@ -573,7 +573,7 @@ IMPORTANT: If you're using the new `spring-cloud-azure-starter-keyvault-secrets` ==== From azure-spring-boot-starter-servicebus-jms to spring-cloud-azure-starter-servicebus-jms This guide is intended to assist in the migration to link:https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-servicebus-jms[spring-cloud-azure-starter-servicebus-jms] from -version 2 of link:https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-servicebus-jms[spring-cloud-azure-starter-servicebus-jms]. +version 3 of link:https://search.maven.org/artifact/com.azure.spring/azure-spring-boot-starter-servicebus-jms[azure-spring-boot-starter-servicebus-jms]. * Please refer to <> and <> to get a whole picture of the changes in 4.0. * Please refer to <> to learn more about the strategy changes in the project naming. From 6bc8729faf954b6c3dc81eb0d146cf683da79f7f Mon Sep 17 00:00:00 2001 From: Muyao Feng Date: Wed, 23 Mar 2022 10:08:46 +0800 Subject: [PATCH 02/10] change in spring_cloud_azure_starter_integration_eventhubs --- docs/src/main/asciidoc/_migration-guide-for-4.0.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc index 9b08933a..98bce952 100644 --- a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc +++ b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc @@ -730,10 +730,10 @@ spring: * Drop `EventHubOperation` with the subscribing function moved to class `EventHubsMessageListenerContainer` and the sending function moved to `EventHubsTemplate`. * Rename `EventHubInboundChannelAdapter` as `EventHubsInboundChannelAdapter` to keep consistent with the service of Azure Event Hubs. -* Change the constructor from `EventHubInboundChannelAdapter(String, SubscribeByGroupOperation, String)` to `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer)` and `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer, ListenerMode)`. -* Change `CheckpointConfig` instantiation style to simple constructor instead of build style. +* Divide the constructor from `EventHubInboundChannelAdapter(String, SubscribeByGroupOperation, String)` into `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer)` and `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer, ListenerMode)`. +* Change `CheckpointConfig` instantiation style to the simple constructor instead of build style. * Drop API `EventHubOperation#setCheckpointConfig`. To set the checkpoint configuration for the inbound channel adapter, users can call the method `EventHubsContainerProperties#setCheckpointConfig`. -* Drop API `EventHubOperation#setBatchConsumerConfig`. To set the checkpoint configuration for the inbound channel adapter, users can call the method `EventHubsContainerProperties#getBatch#setMaxSize` and `EventHubsContainerProperties#getBatch#setMaxWaitTime`. +* Drop API `EventHubOperation#setBatchConsumerConfig`. To set the batch-consuming configuration for the inbound channel adapter, users can call the two methods `EventHubsContainerProperties#getBatch#setMaxSize` and `EventHubsContainerProperties#getBatch#setMaxWaitTime` meanwhile. * For the batch consuming mode, change the message header names converted from batched messages. - Change message header from `azure_eventhub_enqueued_time` to `azure_eventhubs_batch_converted_enqueued_time`. - Change message header from `azure_eventhub_offset` to `azure_eventhubs_batch_converted_offset`. From 678ff4cfabfd7f7de14af3b8b7ab1b7eac04acd0 Mon Sep 17 00:00:00 2001 From: Muyao Feng Date: Wed, 23 Mar 2022 11:01:48 +0800 Subject: [PATCH 03/10] change in spring_integration_azure_eventhubs --- docs/src/main/asciidoc/_migration-guide-for-4.0.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc index 98bce952..057e07e8 100644 --- a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc +++ b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc @@ -875,10 +875,10 @@ version 2 of link:https://search.maven.org/artifact/com.azure.spring/azure-sprin * Drop `EventHubOperation` with the subscribing function moved to class `EventHubsMessageListenerContainer` and the sending function moved to `EventHubsTemplate`. * Rename `EventHubInboundChannelAdapter` as `EventHubsInboundChannelAdapter` to keep consistent with the service of Azure Event Hubs. -* Change the constructor from `EventHubInboundChannelAdapter(String, SubscribeByGroupOperation, String)` to `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer)` and `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer, ListenerMode)`. -* Change `CheckpointConfig` instantiation style to simple constructor instead of build style. +* Divide the constructor from `EventHubInboundChannelAdapter(String, SubscribeByGroupOperation, String)` into `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer)` and `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer, ListenerMode)`. +* Change `CheckpointConfig` instantiation style to the simple constructor instead of build style. * Drop API `EventHubOperation#setCheckpointConfig`. To set the checkpoint configuration for the inbound channel adapter, users can call the method `EventHubsContainerProperties#setCheckpointConfig`. -* Drop API `EventHubOperation#setBatchConsumerConfig`. To set the checkpoint configuration for the inbound channel adapter, users can call the method `EventHubsContainerProperties#getBatch#setMaxSize` and `EventHubsContainerProperties#getBatch#setMaxWaitTime`. +* Drop API `EventHubOperation#setBatchConsumerConfig`. To set the batch-consuming configuration for the inbound channel adapter, users can call the two methods `EventHubsContainerProperties#getBatch#setMaxSize` and `EventHubsContainerProperties#getBatch#setMaxWaitTime` meanwhile. * For the batch consuming mode, change the message header names converted from batched messages. - Change message header from `azure_eventhub_enqueued_time` to `azure_eventhubs_batch_converted_enqueued_time`. - Change message header from `azure_eventhub_offset` to `azure_eventhubs_batch_converted_offset`. From f73a0b85aff8563faba43bfad7c6daec8cc6a9e6 Mon Sep 17 00:00:00 2001 From: Muyao Feng Date: Wed, 23 Mar 2022 14:56:57 +0800 Subject: [PATCH 04/10] change in spring_cloud_azure_starter_integration_servicebus --- .../asciidoc/_migration-guide-for-4.0.adoc | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc index 057e07e8..d35d24d0 100644 --- a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc +++ b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc @@ -931,8 +931,8 @@ the prefix remains to be as `spring.cloud.azure.servicebus`. |*spring.cloud.azure*.resource-group|*spring.cloud.azure.servicebus*.resource.resource-group |*spring.cloud.azure.servicebus*.transport-type |*spring.cloud.azure.servicebus*.client.transport-type |*spring.cloud.azure.servicebus*.retry-options.retry-mode |*spring.cloud.azure.servicebus*.retry.mode -|*spring.cloud.azure.servicebus*.retry-options.max-retries |*spring.cloud.azure.servicebus*.retry.exponential.max-retries or *spring.cloud.azure.servicebus*.retry.fixed.max-retries, should be configured according to *spring.cloud.azure.servicebus*.retry.mode -|*spring.cloud.azure.servicebus*.retry-options.delay |*spring.cloud.azure.servicebus*.retry.exponential.base-delay or *spring.cloud.azure.servicebus*.retry.fixed.delay, should be configured according to *spring.cloud.azure.servicebus*.retry.mode +|*spring.cloud.azure.servicebus*.retry-options.max-retries |*spring.cloud.azure.servicebus*.retry.exponential.max-retries or *spring.cloud.azure.servicebus*.retry.fixed.max-retries, should be configured depends on *spring.cloud.azure.servicebus*.retry.mode=*fixed* or *exponential* +|*spring.cloud.azure.servicebus*.retry-options.delay |*spring.cloud.azure.servicebus*.retry.exponential.base-delay or *spring.cloud.azure.servicebus*.retry.fixed.delay, should be configured depends on *spring.cloud.azure.servicebus*.retry.mode=*fixed* or *exponential* |*spring.cloud.azure.servicebus*.retry-options.max-delay |*spring.cloud.azure.servicebus*.retry.exponential.max-delay |*spring.cloud.azure.servicebus*.retry-options.try-timeout |*spring.cloud.azure.servicebus*.retry.try-timeout |=== @@ -940,13 +940,13 @@ the prefix remains to be as `spring.cloud.azure.servicebus`. [#api-spring-cloud-azure-starter-integration-servicebus] ===== API Changes * Drop `ServiceBusQueueOperation` and `ServiceBusTopicOperation` with the subscribing function moved to class `ServiceBusMessageListenerContainer` and the sending function moved to `ServiceBusTemplate`. -* Drop `ServiceBusQueueInboundChannelAdapter` and `ServiceBusTopicInboundChannelAdapter`, and combine the function of listening to a Service Bus queue or topic entity to `ServiceBusInboundChannelAdapter`. -* Change the constructor from `ServiceBusXXXInboundChannelAdapter(String, SubscribeByGroupOperation, String)` to `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer)` and `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer, ListenerMode)`. -* Drop API `setCheckpointConfig` of ServiceBusTopicOperation or ServiceBusQueueOperation. To set the checkpoint configuration for the inbound channel adapter, 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. -* Drop API `setClientConfig` of `ServiceBusQueueOperation` and `ServiceBusTopicOperation`. To configure the underlying `ServiceBusProcessorClient` used by the inbound channel adapter, users can use `ServiceBusContainerProperties` instead. -* Drop `CompletableFuture` support of `ServiceBusTemplate` and `DefaultMessageHandler` and support Reactor instead. -* Add new API of `setDefaultEntityType` for `ServiceBusTemplate` to specify the entity type, which is required when no bean of `PropertiesSupplier<String, ProducerProperties>` is provided for the `ProducerProperties#entityType`. -* Drop message header of `AzureHeaders.RAW_ID`. Please use `ServiceBusMessageHeaders.MESSAGE_ID` instead. +* Drop `ServiceBusQueueInboundChannelAdapter` and `ServiceBusTopicInboundChannelAdapter` with the listening to a Service Bus queue/topic entity function moved to `ServiceBusInboundChannelAdapter`. +* Divide the constructor from `ServiceBusXXXInboundChannelAdapter(String, SubscribeByGroupOperation, String)` into `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer)` and `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer, ListenerMode)`. +* Drop API `ServiceBusQueueOperation/ServiceBusTopicOperation#setCheckpointConfig`. To set the checkpoint configuration for the inbound channel adapter, 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. +* Drop API `ServiceBusQueueOperation/ServiceBusTopicOperation#setClientConfig` . To configure the underlying `ServiceBusProcessorClient` used by the inbound channel adapter, users can use `ServiceBusContainerProperties` instead. +* Drop `CompletableFuture` support in `ServiceBusTemplate` and `DefaultMessageHandler`, support `Reactor` instead. +* Add new API of `ServiceBusTemplate#setDefaultEntityType` to specify the entity type, which is required when no bean of `PropertiesSupplier<String, ProducerProperties>` is provided for the `ProducerProperties#entityType`. +* Drop message header `AzureHeaders.RAW_ID`. Please use `ServiceBusMessageHeaders.MESSAGE_ID` instead. .Class mapping from azure-spring-cloud-starter-servicebus to spring-cloud-azure-starter-integration-servicebus [cols="<,<", options="header"] @@ -962,7 +962,7 @@ the prefix remains to be as `spring.cloud.azure.servicebus`. ====== Sample Code Snippet -1. ServiceBusInboundChannelAdapter sample code: +1.ServiceBusInboundChannelAdapter sample code: Legacy code of using `ServiceBusQueueInboundChannelAdapter` or `ServiceBusTopicInboundChannelAdapter`: @@ -1034,7 +1034,7 @@ public class Demo { } ---- -2. DefaultMessageHandler sample code: +2.DefaultMessageHandler sample code: Legacy code, taking queue as example: From cff9678fe04aef9308d793b7829e10d30cc3c26b Mon Sep 17 00:00:00 2001 From: Muyao Feng Date: Wed, 23 Mar 2022 15:07:41 +0800 Subject: [PATCH 05/10] change in spring-integration-azure-servicebus --- .../main/asciidoc/_migration-guide-for-4.0.adoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc index d35d24d0..60b14a7d 100644 --- a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc +++ b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc @@ -1100,13 +1100,13 @@ version 2 of link:https://search.maven.org/artifact/com.azure.spring/azure-sprin [#api-spring-integration-azure-servicebus] ===== API Changes * Drop `ServiceBusQueueOperation` and `ServiceBusTopicOperation` with the subscribing function moved to class `ServiceBusMessageListenerContainer` and the sending function moved to `ServiceBusTemplate`. -* Drop `ServiceBusQueueInboundChannelAdapter` and `ServiceBusTopicInboundChannelAdapter`, and combine the function of listening to a Service Bus queue or topic entity to `ServiceBusInboundChannelAdapter`. -* Change the constructor from `ServiceBusXXXInboundChannelAdapter(String, SubscribeByGroupOperation, String)` to `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer)` and `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer, ListenerMode)`. -* Drop API `setCheckpointConfig` of ServiceBusTopicOperation or ServiceBusQueueOperation. To set the checkpoint configuration for the inbound channel adapter, 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. -* Drop API `setClientConfig` of `ServiceBusQueueOperation` and `ServiceBusTopicOperation`. To configure the underlying `ServiceBusProcessorClient` used by the inbound channel adapter, users can use `ServiceBusContainerProperties` instead. -* Drop `CompletableFuture` support of `ServiceBusTemplate` and `DefaultMessageHandler` and support Reactor instead. -* Add new API of `setDefaultEntityType` for `ServiceBusTemplate` to specify the entity type, which is required when no bean of `PropertiesSupplier<String, ProducerProperties>` is provided for the `ProducerProperties#entityType`. -* Drop message header of `AzureHeaders.RAW_ID`. Please use `ServiceBusMessageHeaders.MESSAGE_ID` instead. +* Drop `ServiceBusQueueInboundChannelAdapter` and `ServiceBusTopicInboundChannelAdapter` with the listening to a Service Bus queue/topic entity function moved to `ServiceBusInboundChannelAdapter`. +* Divide the constructor from `ServiceBusXXXInboundChannelAdapter(String, SubscribeByGroupOperation, String)` into `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer)` and `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer, ListenerMode)`. +* Drop API `ServiceBusQueueOperation/ServiceBusTopicOperation#setCheckpointConfig`. To set the checkpoint configuration for the inbound channel adapter, 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. +* Drop API `ServiceBusQueueOperation/ServiceBusTopicOperation#setClientConfig` . To configure the underlying `ServiceBusProcessorClient` used by the inbound channel adapter, users can use `ServiceBusContainerProperties` instead. +* Drop `CompletableFuture` support in `ServiceBusTemplate` and `DefaultMessageHandler`, support `Reactor` instead. +* Add new API of `ServiceBusTemplate#setDefaultEntityType` to specify the entity type, which is required when no bean of `PropertiesSupplier<String, ProducerProperties>` is provided for the `ProducerProperties#entityType`. +* Drop message header `AzureHeaders.RAW_ID`. Please use `ServiceBusMessageHeaders.MESSAGE_ID` instead. .Class mapping from azure-spring-integration-servicebus to spring-integration-azure-servicebus [cols="<,<", options="header"] From 39a3ffbb7a886e183620da7ef9b78cb5b70f546c Mon Sep 17 00:00:00 2001 From: Muyao Feng Date: Wed, 23 Mar 2022 15:49:52 +0800 Subject: [PATCH 06/10] change in spring-cloud-azure-starter-integration-storage-queue --- docs/src/main/asciidoc/_migration-guide-for-4.0.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc index 60b14a7d..3664671e 100644 --- a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc +++ b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc @@ -1150,7 +1150,7 @@ All configuration property names changed the prefix from `spring.cloud.azure.sto ===== API Changes * Drop `StorageQueueOperation` and provide `StorageQueueTemplate` instead. -* Do not support configuration of checkpoint mode in `StorageQueueTemplate`, only the `MANUAL` mode is supported. +* Drop `checkpoint-mode` configuration in `StorageQueueTemplate`, only support the `MANUAL` mode. .Class mapping from azure-spring-cloud-starter-storage-queue to spring-cloud-azure-starter-integration-storage-queue [cols="<~,<~", options="header"] From e11d3beb74cb99cf231477053dd759c1bb044660 Mon Sep 17 00:00:00 2001 From: Muyao Feng Date: Wed, 23 Mar 2022 15:54:45 +0800 Subject: [PATCH 07/10] change in spring-integration-azure-storage-queue --- docs/src/main/asciidoc/_migration-guide-for-4.0.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc index 3664671e..76b6d50f 100644 --- a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc +++ b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc @@ -1177,7 +1177,7 @@ version 2 of link:https://search.maven.org/artifact/com.azure.spring/azure-sprin ===== API Changes * Drop `StorageQueueOperation` and provide `StorageQueueTemplate` instead. -* Do not support configuration of checkpoint mode in `StorageQueueTemplate`, only the `MANUAL` mode is supported. +* Drop `checkpoint-mode` configuration in `StorageQueueTemplate`, only support the `MANUAL` mode. .Class mapping from azure-spring-integration-storage-queue to spring-integration-azure-storage-queue [cols="<~,<~", options="header"] From af5cdb15ed9c00237543af5652ef06b519cde4d6 Mon Sep 17 00:00:00 2001 From: Muyao Feng Date: Thu, 24 Mar 2022 08:34:48 +0800 Subject: [PATCH 08/10] change in spring-cloud-azure-stream-binder-eventhubs --- docs/src/main/asciidoc/_migration-guide-for-4.0.adoc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc index 76b6d50f..3a0d05c1 100644 --- a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc +++ b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc @@ -1194,7 +1194,7 @@ version 2 of link:https://search.maven.org/artifact/com.azure.spring/azure-sprin ==== From azure-spring-cloud-stream-binder-eventhubs to spring-cloud-azure-stream-binder-eventhubs This guide is intended to assist in the migration to link:https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-stream-binder-eventhubs[spring-cloud-azure-stream-binder-eventhubs] from -version 2 of link:https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-stream-binder-eventhubs[spring-cloud-azure-stream-binder-eventhubs]. +version 2 of link:https://search.maven.org/artifact/com.azure.spring/azure-spring-cloud-stream-binder-eventhubs[azure-spring-cloud-stream-binder-eventhubs]. * Please refer to <> and <> to get a whole picture of the changes in 4.0. * Please refer to <> to learn more about the strategy changes in the project naming. @@ -1229,7 +1229,7 @@ Changes for the child entries for following prefix, please refer the following t |*spring.cloud.stream.eventhub.bindings..consumer*.start-position |*spring.cloud.stream.eventhubs.bindings..consumer*.initial-partition-event-position |=== -NOTE: The value type of the start position configuration is also changed. It's changed from an enum of `com.azure.spring.integration.core.api.StartPosition` to a `map` of `StartPositionProperties` for each partition. Thus, the key is the partition id, and the value is of `com.azure.spring.cloud.service.eventhubs.properties.StartPositionProperties` which includes properties of offset, sequence number, enqueued date time and whether inclusive. +NOTE: The value type of the `start-position` configuration is also changed from an enum of `com.azure.spring.integration.core.api.StartPosition` to a `map` of `StartPositionProperties` for each partition. Thus, the key is the partition id, and the value is of `com.azure.spring.cloud.service.eventhubs.properties.StartPositionProperties` which includes properties of offset, sequence number, enqueued date time and whether inclusive. ====== Configuration migration examples To use the connection string for authentication and migrate the above mentioned properties, configuration changes are listed as below: @@ -1307,6 +1307,8 @@ while other `Data` related roles are required for messaging operations, please r For authentication based on ARM, taking service principal as example, configuration migration is listed as below, where the assigned role should not change: +Legacy configuration: + [source,yaml] ---- spring: @@ -1339,7 +1341,7 @@ spring: resource-group: ${RESOURCE_GROUP} ---- -You can also migrate to authenticate and authorize with Azure AD directly without making a detour to ARM. Make sure to grant the security principal necessary `Data` roles for messaging operations. The configuration examples of the service principal and the manged identity are listed as below: +You can also migrate to authenticate and authorize with Azure AD directly without making a detour to ARM. Make sure to grant the security principal necessary `Data` roles for messaging operations. The configuration examples of the service principal and the managed identity are listed as below: * With a service principal From d6d96b63f6bf09b443ea8bf06aae4a0c8a4762e2 Mon Sep 17 00:00:00 2001 From: Muyao Feng Date: Thu, 24 Mar 2022 09:36:49 +0800 Subject: [PATCH 09/10] change in spring-cloud-azure-stream-binder-servicebus --- docs/src/main/asciidoc/_migration-guide-for-4.0.adoc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc index 3a0d05c1..de49f5cf 100644 --- a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc +++ b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc @@ -1419,8 +1419,8 @@ IMPORTANT: The binder type is combined from `servicebus-queue` and `servicebus-t |*spring.cloud.azure*.resource-group|*spring.cloud.azure.servicebus*.resource.resource-group |*spring.cloud.azure.servicebus*.transport-type |*spring.cloud.azure.servicebus*.client.transport-type |*spring.cloud.azure.servicebus*.retry-options.retry-mode |*spring.cloud.azure.servicebus*.retry.mode -|*spring.cloud.azure.servicebus*.retry-options.max-retries |*spring.cloud.azure.servicebus*.retry.exponential.max-retries or *spring.cloud.azure.servicebus*.retry.fixed.max-retries, should be configured according to *spring.cloud.azure.servicebus*.retry.mode -|*spring.cloud.azure.servicebus*.retry-options.delay |*spring.cloud.azure.servicebus*.retry.exponential.base-delay or *spring.cloud.azure.servicebus*.retry.fixed.delay, should be configured according to *spring.cloud.azure.servicebus*.retry.mode +|*spring.cloud.azure.servicebus*.retry-options.max-retries |*spring.cloud.azure.servicebus*.retry.exponential.max-retries or *spring.cloud.azure.servicebus*.retry.fixed.max-retries, should be configured depends on *spring.cloud.azure.servicebus*.retry.mode=*fixed* or *exponential* +|*spring.cloud.azure.servicebus*.retry-options.delay |*spring.cloud.azure.servicebus*.retry.exponential.base-delay or *spring.cloud.azure.servicebus*.retry.fixed.delay, should be configured depends on *spring.cloud.azure.servicebus*.retry.mode=*fixed* or *exponential* |*spring.cloud.azure.servicebus*.retry-options.max-delay |*spring.cloud.azure.servicebus*.retry.exponential.max-delay |*spring.cloud.azure.servicebus*.retry-options.try-timeout |*spring.cloud.azure.servicebus*.retry.try-timeout |*spring.cloud.stream.servicebus.queue*.bindings.* |*spring.cloud.stream.servicebus*.bindings.* @@ -1431,7 +1431,8 @@ IMPORTANT: The binder type is combined from `servicebus-queue` and `servicebus-t |*spring.cloud.stream.servicebus.topic*.bindings..consumer.*checkpoint-mode* |*spring.cloud.stream.servicebus*.bindings..consumer.*auto-complete* |=== -NOTE: The concurrency property will replace maxConcurrentSessions when sessionsEnabled is `true` and maxConcurrentCalls when sessionsEnabled is `false`. Enabling auto-complete is equal to `RECORD` checkpoint mode, and oppositely the `MANUAL` mode. +NOTE: The concurrency property will be replaced by the maxConcurrentSessions when sessionsEnabled is `true` and the maxConcurrentCalls when sessionsEnabled is `false`. +NOTE: Enabling auto-complete is equal to `RECORD` checkpoint mode, and oppositely the `MANUAL` mode. ====== Configuration migration examples @@ -1531,7 +1532,7 @@ spring: resource-group: ${SERVICEBUS_RESOURCE_GROUP} ---- -You can also migrate to authenticate and authorize with Azure AD directly without making a detour to ARM. Make sure to grant the security principal necessary `Data` roles for messaging operations. The configuration examples of the service principal and the manged identity are listed as below: +You can also migrate to authenticate and authorize with Azure AD directly without making a detour to ARM. Make sure to grant the security principal necessary `Data` roles for messaging operations. The configuration examples of the service principal and the managed identity are listed as below: * With a service principal @@ -1566,7 +1567,7 @@ spring: [#api-spring-cloud-azure-stream-binder-servicebus] ===== API Changes -* Drop message header of `AzureHeaders.RAW_ID`. Please use `ServiceBusMessageHeaders.MESSAGE_ID` instead. +* Drop message header `AzureHeaders.RAW_ID`. Please use `ServiceBusMessageHeaders.MESSAGE_ID` instead. .Class mapping from azure-spring-cloud-stream-binder-servicebus to spring-cloud-azure-stream-binder-servicebus [cols="<~,<~", options="header"] From d46a792d1ba31433b0b1b3c7513daa07e5d8a28d Mon Sep 17 00:00:00 2001 From: Muyao Feng Date: Thu, 24 Mar 2022 15:09:45 +0800 Subject: [PATCH 10/10] change comments --- .../asciidoc/_migration-guide-for-4.0.adoc | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc index de49f5cf..4e127afe 100644 --- a/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc +++ b/docs/src/main/asciidoc/_migration-guide-for-4.0.adoc @@ -730,7 +730,7 @@ spring: * Drop `EventHubOperation` with the subscribing function moved to class `EventHubsMessageListenerContainer` and the sending function moved to `EventHubsTemplate`. * Rename `EventHubInboundChannelAdapter` as `EventHubsInboundChannelAdapter` to keep consistent with the service of Azure Event Hubs. -* Divide the constructor from `EventHubInboundChannelAdapter(String, SubscribeByGroupOperation, String)` into `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer)` and `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer, ListenerMode)`. +* Change the constructor from `EventHubInboundChannelAdapter(String, SubscribeByGroupOperation, String)` to `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer)` and `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer, ListenerMode)`. * Change `CheckpointConfig` instantiation style to the simple constructor instead of build style. * Drop API `EventHubOperation#setCheckpointConfig`. To set the checkpoint configuration for the inbound channel adapter, users can call the method `EventHubsContainerProperties#setCheckpointConfig`. * Drop API `EventHubOperation#setBatchConsumerConfig`. To set the batch-consuming configuration for the inbound channel adapter, users can call the two methods `EventHubsContainerProperties#getBatch#setMaxSize` and `EventHubsContainerProperties#getBatch#setMaxWaitTime` meanwhile. @@ -875,7 +875,7 @@ version 2 of link:https://search.maven.org/artifact/com.azure.spring/azure-sprin * Drop `EventHubOperation` with the subscribing function moved to class `EventHubsMessageListenerContainer` and the sending function moved to `EventHubsTemplate`. * Rename `EventHubInboundChannelAdapter` as `EventHubsInboundChannelAdapter` to keep consistent with the service of Azure Event Hubs. -* Divide the constructor from `EventHubInboundChannelAdapter(String, SubscribeByGroupOperation, String)` into `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer)` and `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer, ListenerMode)`. +* Change the constructor from `EventHubInboundChannelAdapter(String, SubscribeByGroupOperation, String)` to `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer)` and `EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer, ListenerMode)`. * Change `CheckpointConfig` instantiation style to the simple constructor instead of build style. * Drop API `EventHubOperation#setCheckpointConfig`. To set the checkpoint configuration for the inbound channel adapter, users can call the method `EventHubsContainerProperties#setCheckpointConfig`. * Drop API `EventHubOperation#setBatchConsumerConfig`. To set the batch-consuming configuration for the inbound channel adapter, users can call the two methods `EventHubsContainerProperties#getBatch#setMaxSize` and `EventHubsContainerProperties#getBatch#setMaxWaitTime` meanwhile. @@ -931,8 +931,8 @@ the prefix remains to be as `spring.cloud.azure.servicebus`. |*spring.cloud.azure*.resource-group|*spring.cloud.azure.servicebus*.resource.resource-group |*spring.cloud.azure.servicebus*.transport-type |*spring.cloud.azure.servicebus*.client.transport-type |*spring.cloud.azure.servicebus*.retry-options.retry-mode |*spring.cloud.azure.servicebus*.retry.mode -|*spring.cloud.azure.servicebus*.retry-options.max-retries |*spring.cloud.azure.servicebus*.retry.exponential.max-retries or *spring.cloud.azure.servicebus*.retry.fixed.max-retries, should be configured depends on *spring.cloud.azure.servicebus*.retry.mode=*fixed* or *exponential* -|*spring.cloud.azure.servicebus*.retry-options.delay |*spring.cloud.azure.servicebus*.retry.exponential.base-delay or *spring.cloud.azure.servicebus*.retry.fixed.delay, should be configured depends on *spring.cloud.azure.servicebus*.retry.mode=*fixed* or *exponential* +|*spring.cloud.azure.servicebus*.retry-options.max-retries |*spring.cloud.azure.servicebus*.retry.exponential.max-retries or *spring.cloud.azure.servicebus*.retry.fixed.max-retries, should be configured depending on *spring.cloud.azure.servicebus*.retry.mode=*fixed* or *exponential* +|*spring.cloud.azure.servicebus*.retry-options.delay |*spring.cloud.azure.servicebus*.retry.exponential.base-delay or *spring.cloud.azure.servicebus*.retry.fixed.delay, should be configured depending on *spring.cloud.azure.servicebus*.retry.mode=*fixed* or *exponential* |*spring.cloud.azure.servicebus*.retry-options.max-delay |*spring.cloud.azure.servicebus*.retry.exponential.max-delay |*spring.cloud.azure.servicebus*.retry-options.try-timeout |*spring.cloud.azure.servicebus*.retry.try-timeout |=== @@ -940,10 +940,11 @@ the prefix remains to be as `spring.cloud.azure.servicebus`. [#api-spring-cloud-azure-starter-integration-servicebus] ===== API Changes * Drop `ServiceBusQueueOperation` and `ServiceBusTopicOperation` with the subscribing function moved to class `ServiceBusMessageListenerContainer` and the sending function moved to `ServiceBusTemplate`. -* Drop `ServiceBusQueueInboundChannelAdapter` and `ServiceBusTopicInboundChannelAdapter` with the listening to a Service Bus queue/topic entity function moved to `ServiceBusInboundChannelAdapter`. -* Divide the constructor from `ServiceBusXXXInboundChannelAdapter(String, SubscribeByGroupOperation, String)` into `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer)` and `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer, ListenerMode)`. -* Drop API `ServiceBusQueueOperation/ServiceBusTopicOperation#setCheckpointConfig`. To set the checkpoint configuration for the inbound channel adapter, 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. -* Drop API `ServiceBusQueueOperation/ServiceBusTopicOperation#setClientConfig` . To configure the underlying `ServiceBusProcessorClient` used by the inbound channel adapter, users can use `ServiceBusContainerProperties` instead. +* Drop `ServiceBusQueueInboundChannelAdapter` and `ServiceBusTopicInboundChannelAdapter`, and move the functionality to listen to a Service Bus queue/topic entity to ServiceBusInboundChannelAdapter. +* Change the constructor from `ServiceBusQueueInboundChannelAdapter(String, SubscribeByGroupOperation, String)` to `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer)` and `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer, ListenerMode)`. +* Change the constructor from `ServiceBusTopicInboundChannelAdapter(String, SubscribeByGroupOperation, String)` to `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer)` and `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer, ListenerMode)`. +* Drop APIs `ServiceBusQueueOperation#setCheckpointConfig` and `ServiceBusTopicOperation#setCheckpointConfig`. To set the checkpoint configuration for the inbound channel adapter, 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. +* Drop APIs `ServiceBusQueueOperatio#setClientConfig` and `ServiceBusTopicOperation#setClientConfig`. To configure the underlying `ServiceBusProcessorClient` used by the inbound channel adapter, users can use `ServiceBusContainerProperties` instead. * Drop `CompletableFuture` support in `ServiceBusTemplate` and `DefaultMessageHandler`, support `Reactor` instead. * Add new API of `ServiceBusTemplate#setDefaultEntityType` to specify the entity type, which is required when no bean of `PropertiesSupplier<String, ProducerProperties>` is provided for the `ProducerProperties#entityType`. * Drop message header `AzureHeaders.RAW_ID`. Please use `ServiceBusMessageHeaders.MESSAGE_ID` instead. @@ -1100,10 +1101,11 @@ version 2 of link:https://search.maven.org/artifact/com.azure.spring/azure-sprin [#api-spring-integration-azure-servicebus] ===== API Changes * Drop `ServiceBusQueueOperation` and `ServiceBusTopicOperation` with the subscribing function moved to class `ServiceBusMessageListenerContainer` and the sending function moved to `ServiceBusTemplate`. -* Drop `ServiceBusQueueInboundChannelAdapter` and `ServiceBusTopicInboundChannelAdapter` with the listening to a Service Bus queue/topic entity function moved to `ServiceBusInboundChannelAdapter`. -* Divide the constructor from `ServiceBusXXXInboundChannelAdapter(String, SubscribeByGroupOperation, String)` into `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer)` and `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer, ListenerMode)`. -* Drop API `ServiceBusQueueOperation/ServiceBusTopicOperation#setCheckpointConfig`. To set the checkpoint configuration for the inbound channel adapter, 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. -* Drop API `ServiceBusQueueOperation/ServiceBusTopicOperation#setClientConfig` . To configure the underlying `ServiceBusProcessorClient` used by the inbound channel adapter, users can use `ServiceBusContainerProperties` instead. +* Drop `ServiceBusQueueInboundChannelAdapter` and `ServiceBusTopicInboundChannelAdapter`, and move the functionality to listen to a Service Bus queue/topic entity to ServiceBusInboundChannelAdapter. +* Change the constructor from `ServiceBusQueueInboundChannelAdapter(String, SubscribeByGroupOperation, String)` to `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer)` and `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer, ListenerMode)`. +* Change the constructor from `ServiceBusTopicInboundChannelAdapter(String, SubscribeByGroupOperation, String)` to `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer)` and `ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer, ListenerMode)`. +* Drop APIs `ServiceBusQueueOperation#setCheckpointConfig` and `ServiceBusTopicOperation#setCheckpointConfig`. To set the checkpoint configuration for the inbound channel adapter, 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. +* Drop APIs `ServiceBusQueueOperation#setClientConfig` and `ServiceBusTopicOperation#setClientConfig`. To configure the underlying `ServiceBusProcessorClient` used by the inbound channel adapter, users can use `ServiceBusContainerProperties` instead. * Drop `CompletableFuture` support in `ServiceBusTemplate` and `DefaultMessageHandler`, support `Reactor` instead. * Add new API of `ServiceBusTemplate#setDefaultEntityType` to specify the entity type, which is required when no bean of `PropertiesSupplier<String, ProducerProperties>` is provided for the `ProducerProperties#entityType`. * Drop message header `AzureHeaders.RAW_ID`. Please use `ServiceBusMessageHeaders.MESSAGE_ID` instead. @@ -1419,8 +1421,8 @@ IMPORTANT: The binder type is combined from `servicebus-queue` and `servicebus-t |*spring.cloud.azure*.resource-group|*spring.cloud.azure.servicebus*.resource.resource-group |*spring.cloud.azure.servicebus*.transport-type |*spring.cloud.azure.servicebus*.client.transport-type |*spring.cloud.azure.servicebus*.retry-options.retry-mode |*spring.cloud.azure.servicebus*.retry.mode -|*spring.cloud.azure.servicebus*.retry-options.max-retries |*spring.cloud.azure.servicebus*.retry.exponential.max-retries or *spring.cloud.azure.servicebus*.retry.fixed.max-retries, should be configured depends on *spring.cloud.azure.servicebus*.retry.mode=*fixed* or *exponential* -|*spring.cloud.azure.servicebus*.retry-options.delay |*spring.cloud.azure.servicebus*.retry.exponential.base-delay or *spring.cloud.azure.servicebus*.retry.fixed.delay, should be configured depends on *spring.cloud.azure.servicebus*.retry.mode=*fixed* or *exponential* +|*spring.cloud.azure.servicebus*.retry-options.max-retries |*spring.cloud.azure.servicebus*.retry.exponential.max-retries or *spring.cloud.azure.servicebus*.retry.fixed.max-retries, should be configured depending on *spring.cloud.azure.servicebus*.retry.mode=*fixed* or *exponential* +|*spring.cloud.azure.servicebus*.retry-options.delay |*spring.cloud.azure.servicebus*.retry.exponential.base-delay or *spring.cloud.azure.servicebus*.retry.fixed.delay, should be configured depending on *spring.cloud.azure.servicebus*.retry.mode=*fixed* or *exponential* |*spring.cloud.azure.servicebus*.retry-options.max-delay |*spring.cloud.azure.servicebus*.retry.exponential.max-delay |*spring.cloud.azure.servicebus*.retry-options.try-timeout |*spring.cloud.azure.servicebus*.retry.try-timeout |*spring.cloud.stream.servicebus.queue*.bindings.* |*spring.cloud.stream.servicebus*.bindings.* @@ -1432,6 +1434,7 @@ IMPORTANT: The binder type is combined from `servicebus-queue` and `servicebus-t |=== NOTE: The concurrency property will be replaced by the maxConcurrentSessions when sessionsEnabled is `true` and the maxConcurrentCalls when sessionsEnabled is `false`. + NOTE: Enabling auto-complete is equal to `RECORD` checkpoint mode, and oppositely the `MANUAL` mode. ====== Configuration migration examples