-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PROPOSAL] [AMQ-9335] ActiveMQ modernization #1422
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
Open
mattrpav
wants to merge
2
commits into
apache:main
Choose a base branch
from
mattrpav:AMQ-9335
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
## Broker modernization | ||
|
||
[DRAFT] This document is a draft proposal and may be broken up into smaller sub-proposals | ||
|
||
### Problem statement | ||
|
||
Most ActiveMQ broker deployments rely on the Spring Framework (and xbean) for boot, configuration and integration of plugin extension. There are a number of limitations and strategic issues with continuing with this design as the primary approach. | ||
|
||
### Rationale | ||
|
||
Modernization of the ActiveMQ broker will provide new features, improved multi-tenancy and ability to operate in Kubernetes and other cloud-based environments. Additionally, reducing the number of dependencies will reduce the surface area for security vulnerabilities caused by 3rd party projects. | ||
|
||
### Goals | ||
|
||
1. ActiveMQ 7.0 will ship without requiring Spring dependencies for boot, configuration and plugin extension | ||
|
||
2. ActiveMQ 7.0 will support more format options for configuration -- ex. xml, json and/or yaml file segments | ||
|
||
3. ActiveMQ 7.0 will support environment, property and encryption interpolation of configuration values | ||
|
||
4. ActiveMQ 7.0 will include a Builder API for constructing a broker | ||
|
||
### Proposal | ||
|
||
Organize the ActiveMQ modernization into phases with target release versions. Adhere to SEMVER and provide experimental/technical preview abilities to end users without having to require them to build from git. (ie the project may release an alternative dist or secondary boot scripts) | ||
|
||
NOTE: Version numbers are provided for conceptual purposes. The actual version numbers may change as required for release planning. | ||
|
||
### Phases | ||
|
||
#### Phase 0 - Dependency and shared library clean-up | ||
|
||
1. Replace Spring MVC with simple Java-based controller handler | ||
|
||
2. Adopt next-gen openwire module | ||
|
||
3. Refactor/Re-home/Replace common data handling and buffer management classes related to streams, buffers, etc. into a single module to remove redundancy | ||
|
||
4. On-going: unit test modernization -- migrate to JUnit5, new JUnit5 Extension, fix broken tests, migrate junit 3 and junit 4 tests to junit 5. | ||
|
||
#### Phase 1 - Separation of stat, statistics and config fields in classes. Move to config data model classes | ||
|
||
In order to improve configuration, ActiveMQ should move to a full data-model approach for configuration vs class fields (aka bean properties) | ||
|
||
Examples: | ||
|
||
- PolicyEntry | ||
- NetworkBridgeConfiguration | ||
|
||
*Benefits* | ||
|
||
Configuration changes will be 'all-at-once' instead of field-at-a-time. This is required for supporting thread-safe proper runtime configuration change where messages may be flowing and multiple configuration properties need to be modified and race conditions may lead to undesirable results. | ||
|
||
*Requirements* | ||
|
||
A centralized Configuration Service will be used to load config file segments, interpolate environment, system and encrypted properties and configure a BrokerService. | ||
|
||
Tooling: Updated tooling to support validating configuration file segments and previewing environment and encrypted property expansion. | ||
|
||
#### Phase 2 - activemq-boot service | ||
|
||
ActiveMQ Boot Service will be a generic boot lifecycle service that will delegate details about Broker booting to specific boot service provider implementations. | ||
|
||
For example, in order to provide legacy support for Spring-bean based activemq.xml, a SpringBootService implementation will be needed. | ||
|
||
Additional, Boot Service providers may include SPI-based, simple boot (user customized builder expresssion), etc. | ||
|
||
*Requirements* | ||
|
||
A Jetty-boot handler will be required for enabling web-console, API and other servlets. | ||
|
||
#### Phase 3 - Repackaging | ||
|
||
Organizing the activemq modules will allow for reducing dependency leakage to clients. For example, the current activemq-http provides both client and server-side implementations. | ||
|
||
*Common* | ||
activemq-boot: Light-weight boot service for starting brokers, or running cmoplex client-side scenarios (performance testing, etc) | ||
activemq-io: Buffer, Stream and common data handling classes used by clients and servers (aka self-host modern versions of hawt* classes) | ||
|
||
*Broker* | ||
activemq-broker-model: Data model classes, and utility classes for managing data model classes. | ||
activemq-broker-api: API, SPI and JMX MXBean interface definitions. Depends on activemq-broker-model, but provides no implementations | ||
activemq-broker-service: BrokerService classes and default implementations | ||
activemq-broker-amqp: AMQP-based server-side transport | ||
activemq-broker-http: HTTP-based server-side transport (may depend on activemq-client-jms) | ||
activemq-broker-jms: JMS-based server-side transport (may depend on activemq-client-jms) | ||
activemq-broker-mqtt: MQTT-based server-side transport (may depend on activemq-client-mqtt) | ||
activemq-broker-spring: Spring related classes for broker-side (map depend on activemq-client-spring) | ||
|
||
*Client* | ||
activemq-client-http: HTTP-based client support | ||
activemq-client-jms: JMS-based client support | ||
activemq-client-spring: Client-side Spring classes (ie ConnectionFactoryBean, PooledConnectionFactoryBean, etc) | ||
|
||
*Storage* | ||
activemq-store-kahadb: Pluggable storage backend KahaDB | ||
activemq-store-jdbc: Pluggable storage backend JDBC | ||
|
||
#### Phase 4 - Unit test modernization | ||
|
||
1. Provide improved junit5-extension that leverages activemq-boot to provide a fast (and spring-free) unit test harness to load complex configurations. | ||
|
||
2. Moderniaze the activemq-unit-tests Maven module | ||
|
||
!!NEEDS FEEDBACK!! | ||
|
||
The activemq-unit-tests module is massive and difficult to maintain. | ||
|
||
In an effort to help manage test transitive dependencies over time, unit tests will be organized by a folder and domain. This will provide better visibility to test dependency ownership. | ||
|
||
Problem: Many dependencies are needed at runtime and/or are defined externally or loaded outside of a Java language 'import' statement. Spring, SPI, etc. | ||
|
||
Example: | ||
|
||
tests/http | ||
tests/amqp | ||
tests/spring | ||
tests/mqtt | ||
tests/jdbc/derby | ||
tests/jdbc/h2 | ||
tests/jdbc/hsql | ||
tests/jdbc/mysql (using a test container?) | ||
tests/jdbc/postgresql (using a test container?) | ||
|
||
Additionally, this would open the door to leveraging maven profiles for grouping unit tests. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.