-
Notifications
You must be signed in to change notification settings - Fork 2k
Spring Cloud Azure Messaging Design
In Spring Cloud Azure 4.0 we are going to reorganize Spring Cloud Azure Messaging projects to follow Spring abstraction of messaging projects, in order to make our projects easy to be integrated with more features of Spring abstraction.
- Flat and over-aggregated project structure.
- All fundamental classes are placed in azure-spring-integration-core neglecting their internal hierarchical relationships.
- Customers cannot follow Spring abstraction to use associated APIs from current Spring Cloud Azure Messaging modules.
- Unreasonable dependency relationships violating Spring conventions.
- azure-spring-cloud-messaging depends on azure-spring-integration-core, which is incorrect and is confusing to users.
Make the structure of Spring Cloud Azure Messaging projects follow Spring conventions, to be specific:
- Spring Cloud Azure Messaging projects should have similar sub-modules aligned to Spring, including Spring Messaging, Spring Integration and Spring Cloud Stream.
- The dependency relationships of Spring Cloud Azure Messaging projects should be aligned with Spring convention.
- The way current classes being organized should follow associated Spring projects.
- Explanation of line type.
- Solid lines: transitive-dependencies.
- Dashed lines: optional-dependencies.
- The dependency is not fixed all the time, it's OK to add new dependencies when developing related module. The new added dependency should follow the design rule.
The current project structure of Spring Cloud Azure Messaging is not ideal and needs reorganization. To achieve the above goals, we analyze the projects of Spring Kafka, Spring Integration support of Apache Kafka and Spring Cloud Stream support of Apache Kafka, and thus design the structure for Spring Cloud Azure Messaging of Event Hubs, Service Bus and Storage Queue.
The project of Spring Cloud Azure Messaging for Event Hubs is expected to follow the convention of Spring support for Kafka. Thus the project structure is designed as below:
Edit: Spring support Event Hubs
This project covers two sub projects, one is to provide spring support for native Service Bus service, the other is to support Service Bus from JMS API.
The project of Spring Cloud Azure Messaging for Service Bus is expected to follow the convention of Spring support for Kafka. Thus the project structure is designed as below:
Edit: Spring support Service Bus
This project is aimed to provide Spring JMS support to interact with Service Bus with JMS API. The project structure is designed as below:
Edit: Spring JMS support Service Bus
The current project of Spring Cloud Azure Messaging for Storage Queue only involves the integration of Spring Messaging and Spring Integration, the structure is designed as below:
Edit: Spring support Storage Queue
Note: we need further investigation on whether it can support Spring Cloud Stream.
With reference of Spring support for Apache Kafka, we reorganize the structure of Spring Cloud Azure Messaging modules to meet the goal of 4.0. Modules include spring messaging azure, spring integration azure and spring cloud azure stream binder.
This project covers three Azure services: Azure Event Hubs, Azure Service Bus and Azure Storage Queue. For each service, the Azure support for Spring Messaging should contain two modules: a core module implements Spring Messaging abstraction and common utils applied with all Azure Messaging services, the other module implements customization with each service and client factories.
The module is based on spring-messaging and should provide the following components:
- Message Converter to transfer between Spring message and service message
- Message header
- Exception of message handling
- Checkpointer to abstract the check point behavior of different Azure services
We should have three sub modules as
- spring-messaging-azure-eventhubs
- spring-messaging-azure-servicebus
- spring-messaging-azure-storage-queue
On the basis of spring-messaging-azure components, the above modules should also contains the following components:
- Client Factory to build clients
- Operation to perform different message publishing and receiving operation
This project covers three Azure services: Azure Event Hubs, Azure Service Bus and Azure Storage Queue. For each service, the Azure support for Spring Integration should contain two modules: a core module implements basic Spring Integration abstraction and the other module implements customization with each service.
The module is based on spring-integration-core and should provide the following components:
- Inbound Channel Adapter to receive messages from the broker
- Message Handler to publish messages from the broker
We should have three sub modules as
- spring-integration-azure-eventhubs
- spring-integration-azure-servicebus
- spring-integration-azure-storage-queue
This project covers two Azure services: Azure Event Hubs and Azure Service Bus. For each service, the Azure support for Spring Cloud Stream should contain two modules: a core module containing configuration properties and a binder module for SCS abstraction, health indicator and autoconfiguration.
We should have two modules as
- spring-cloud-azure-stream-binder-eventhubs-core
- spring-cloud-azure-stream-binder-servicebus-core
The core module should provide the following components:
- Binding properties, which is to describe extended consumer/producer properties for Azure services
- Provisioner that allow users to provision destinations
- Destination that describe the broker destination
We should have two modules as
- spring-cloud-azure-stream-binder-eventhub
- spring-cloud-azure-stream-binder-servicebus
The binder module should provide the following components:
- Message Channel Binder that integrate with SCS binder abstraction
- Autoconfiguration and customizer to provide binder configuration and enable to customize each clients
- Health Indicator
We should have a module of
- azure-spring-servicebus-jms
This module aims to provide Spring JMS implemention integrated with Service Bus, which should provide the following components:
- All kinds of configuration provider
- Connection Factory to provide amqp connection to Service Bus
- Spring Credential
- Spring Cloud Azure 4.0 Design
- Spring Cloud Azure AutoConfigure Design
- Spring Cloud Azure Core Design
- Spring Cloud Azure Messaging Design
- Spring Cloud Azure Service Bus Spring Jms Support Design
- Design for directory, module name and package path for Spring Cloud Azure messaging
- Design for Remove warning logs of unknown configs for Kafka Passwordless
- Design for Enhance AAD token authentication converter to customized granted authorities converter
- Design for Enhance the ObjectMapper to support Spring Boot's pattern to enable autoconfiguration
- Passwordless connection support for Spring Cloud Azure
- Passwordless connection support for MySQL
- Passwordless connection support for Event Hubs Kafka
- Remove warning logs of unknown configs for Kafka Passwordless