-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Update JmsIO to ActiveMQ 6.2.5 and jakarta.jms #38729
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ | |
| plugins { id 'org.apache.beam.module' } | ||
| applyJavaNature( | ||
| automaticModuleName: 'org.apache.beam.sdk.io.jms', | ||
| requireJavaVersion: JavaVersion.VERSION_17, | ||
| ) | ||
| provideIntegrationTestingDependencies() | ||
| enableJavaPerformanceTesting() | ||
|
|
@@ -32,12 +33,12 @@ dependencies { | |
| implementation project(path: ":sdks:java:core", configuration: "shadow") | ||
| implementation library.java.slf4j_api | ||
| implementation library.java.joda_time | ||
| implementation "org.apache.geronimo.specs:geronimo-jms_2.0_spec:1.0-alpha-2" | ||
| testImplementation library.java.activemq_amqp | ||
| testImplementation library.java.activemq_broker | ||
| testImplementation library.java.activemq_jaas | ||
| testImplementation library.java.activemq_kahadb_store | ||
| testImplementation library.java.activemq_client | ||
| implementation "jakarta.jms:jakarta.jms-api:3.1.0" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
To maintain Java 8 compatibility while migrating to the |
||
| testImplementation library.java.activemq6_amqp | ||
| testImplementation library.java.activemq6_broker | ||
| testImplementation library.java.activemq6_jaas | ||
| testImplementation library.java.activemq6_kahadb_store | ||
| testImplementation library.java.activemq6_client | ||
| testImplementation library.java.hamcrest | ||
| testImplementation library.java.junit | ||
| testImplementation library.java.mockito_core | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,19 @@ | |
| plugins { id 'org.apache.beam.module' } | ||
| applyJavaNature( automaticModuleName: 'org.apache.beam.sdk.io.mqtt') | ||
|
|
||
| // The JMS IO module pulls ActiveMQ 6.2.5 (Java 17) into the shared dependency | ||
| // map. Because the global resolution strategy forces every mapped version, | ||
| // that 6.2.5 would otherwise be forced onto this Java 11 module via the shared | ||
| // org.apache.activemq coordinates. MQTT IO only needs ActiveMQ as an embedded | ||
| // test broker, so pin it back to the Java 11-compatible 5.x line. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see a couple of mentions of making this compatible with Java 11, but then we're forcing Java 17 - do we actually need to force Java 17 or can we just require Java 11?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ActiveMQ is a test dependency for AmqpIO, MqttIO, JmsIO. Instead of modifying build.gradle in the former ones, can we just pin to ActiveMQ 6 in JmsIO? This should give a smaller diff and safer as it doesn't do a global upgrade.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PS: I'm thinking about we should move our Infra to Java17 (probably Java21, to reduce the frequency of this kind of upgrade) while keep Java11 compatibility via cross-compilation. We already use Java21 to publish Javadoc |
||
| configurations.all { | ||
| resolutionStrategy.dependencySubstitution { | ||
| substitute module('org.apache.activemq:activemq-broker') using module(library.java.activemq_broker) | ||
| substitute module('org.apache.activemq:activemq-client') using module(library.java.activemq_client) | ||
| substitute module('org.apache.activemq:activemq-kahadb-store') using module(library.java.activemq_kahadb_store) | ||
| } | ||
| } | ||
|
|
||
| description = "Apache Beam :: SDKs :: Java :: IO :: MQTT" | ||
| ext.summary = "IO to read and write to a MQTT broker." | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qpid JMS Client 2.x requires Java 11 as a minimum runtime version. Since Apache Beam still supports Java 8, upgrading
qpid_jms_client_versionto2.10.0will break Java 8 compatibility for any users or tests utilizing this client. Please verify if this is intentional or if we need to restrict this dependency/module to Java 11+.