Skip to content

Update JmsIO to ActiveMQ 6.2.5 and jakarta.jms - #38729

Merged
Abacn merged 5 commits into
apache:masterfrom
jbonofre:jms-activemq-6.2.5-jakarta
Oct 8, 2026
Merged

Abacn merged 5 commits into
apache:masterfrom
jbonofre:jms-activemq-6.2.5-jakarta

Conversation

@jbonofre

@jbonofre jbonofre commented May 28, 2026 •

Copy link
Copy Markdown
Member

Migrate JmsIO to jakarta.jms (JMS 3.1) with ActiveMQ 6.2.5 and qpid-jms-client 2.10.0. Replaces geronimo-jms_2.0_spec with jakarta.jms-api 3.1.0 and renames all javax.jms imports to jakarta.jms in main and test sources.

JmsIO now requires Java 17. AMQP and MQTT modules are unaffected (kept on ActiveMQ 5.19.2 via a separate activemq6_* library entry).

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request modernizes the JmsIO module by migrating from the legacy javax.jms namespace to the Jakarta Messaging API (jakarta.jms). This change involves updating core dependencies to versions that support the Jakarta EE standard, ensuring compatibility with modern messaging infrastructure.

Highlights

  • Dependency Upgrades: Updated ActiveMQ to 6.2.5 and qpid-jms-client to 2.10.0 to support modern JMS standards.
  • Jakarta EE Migration: Replaced the legacy geronimo-jms_2.0_spec with jakarta.jms-api 3.1.0 and migrated all javax.jms imports to jakarta.jms across the JmsIO module.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the JMS IO module from the legacy javax.jms namespace to the modern jakarta.jms namespace, upgrading ActiveMQ to 6.2.5, Qpid JMS Client to 2.10.0, and adopting jakarta.jms-api:3.1.0. The review feedback identifies critical Java compatibility issues with these upgrades: ActiveMQ 6.x requires Java 17, while Qpid JMS Client 2.x and Jakarta JMS API 3.1.0 require Java 11, which would break Apache Beam's Java 8 and Java 11 compatibility. The reviewer suggests downgrading the Jakarta JMS API to 3.0.0 to maintain Java 8 support and requests verification on how compatibility will be maintained for the other dependencies.

Comment thread sdks/java/io/jms/build.gradle
@github-actions

Copy link
Copy Markdown
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@jbonofre
jbonofre force-pushed the jms-activemq-6.2.5-jakarta branch 7 times, most recently from 52fe765 to dc7ebca Compare June 22, 2026 18:14
@jbonofre
jbonofre force-pushed the jms-activemq-6.2.5-jakarta branch 2 times, most recently from a1f3ae2 to a85672c Compare June 22, 2026 20:33
@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @ahmedabu98 for label java.
R: @damccorm for label build.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@damccorm damccorm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This generally seems fine, but trying to understand the goals. What benefits do we get from the upgrade? It does come at a Java version cost, so want to make sure we're making the right tradeoff.

cc/ @Abacn

// 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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

@jbonofre

Copy link
Copy Markdown
Member Author

@damccorm the goal is to support the latest JMS spec version and so latest ActiveMQ version.

@damccorm

Copy link
Copy Markdown
Contributor

Sounds good - I'm good with the change pending the one open comment thread

@Abacn

Abacn commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Also, JmsIO used to have some weird checkpointing behavior to accommondate Jms spec

In JMS, acknowledging one message automatically acknowledges all messages processed by that specific session up to that point

This caused data loss due to Beam process and commit messages asynchronously. We ended up creating different sessions for each checkpointing: #30054

SInce this is a Jms spec upgrade, let me check if any breaking changes could happen especially checkpointing logics

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Reminder, please take a look at this pr: @ahmedabu98 @damccorm @kennknowles

@github-actions

Copy link
Copy Markdown
Contributor

Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment assign to next reviewer:

R: @chamikaramj for label java.
R: @damccorm for label build.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

@Abacn

Abacn commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Updates: there will be significant changes in JmsIO (support ACKNOWLEDGE_MODE and Python xlang support) in next release. Current plan is to have one (or two) stable version before we moving to Java17

@kennknowles

Copy link
Copy Markdown
Member

R: @Abacn
R: @damccorm

also LGTM but leaving to you guy to confirm the comment thread is done

@kennknowles
kennknowles requested review from Abacn and damccorm and removed request for ahmedabu98 and kennknowles July 23, 2026 20:27
@github-actions

Copy link
Copy Markdown
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

@damccorm

Copy link
Copy Markdown
Contributor

@Abacn @jbonofre now that we're past the release cut, what are next steps? Should we clean this PR up and move forward with it or wait longer?

@jbonofre

Copy link
Copy Markdown
Member Author

@damccorm I will rebase. I think this PR is good to go after rebase.

@derrickaw

Copy link
Copy Markdown
Collaborator

Hi @jbonofre, will you be rebasing soon? thanks

@damccorm
damccorm removed their request for review October 1, 2026 16:24
@derrickaw
derrickaw force-pushed the jms-activemq-6.2.5-jakarta branch from a85672c to e7961f1 Compare October 7, 2026 18:02
@github-actions github-actions Bot added the python label Oct 7, 2026
@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.75%. Comparing base (76f6e6d) to head (df1695b).
⚠️ Report is 96 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #38729      +/-   ##
============================================
+ Coverage     56.16%   58.75%   +2.58%     
- Complexity     2288    13918   +11630     
============================================
  Files          1124     2585    +1461     
  Lines        178336   271699   +93363     
  Branches       1489    11243    +9754     
============================================
+ Hits         100170   159636   +59466     
- Misses        75645   106060   +30415     
- Partials       2521     6003    +3482     
Flag Coverage Δ
java 65.26% <ø> (-10.52%) ⬇️
python 79.61% <ø> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@derrickaw

Copy link
Copy Markdown
Collaborator

R: @damccorm @Abacn

- name: Setup environment
uses: ./.github/actions/setup-environment-action
with:
java-version: '17'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer need these lines as the CI is on Java 21 currently

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated, thanks

activemq_junit : "org.apache.activemq.tooling:activemq-junit:$activemq_version",
activemq_kahadb_store : "org.apache.activemq:activemq-kahadb-store:$activemq_version",
activemq_mqtt : "org.apache.activemq:activemq-mqtt:$activemq_version",
activemq6_amqp : "org.apache.activemq:activemq-amqp:$activemq6_version",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if activemq 5 and 6 have same package name, BeamModulePlugin version resolution doesn't work well as it tries to enforce a version it first see. As you may have already noticed and added force resolution in io.amqp

Consider simply bump activemq deps to v6 and pin to v5 in activemq, which has same effect

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, done

jbonofre and others added 5 commits October 8, 2026 17:00
Bump activemq to 6.2.5 and qpid-jms-client to 2.10.0, both of which
target jakarta.jms. Replace the geronimo-jms_2.0_spec dependency with
jakarta.jms-api 3.1.0 and migrate all javax.jms imports and javadoc
references in JmsIO main and test sources to jakarta.jms.
@derrickaw
derrickaw force-pushed the jms-activemq-6.2.5-jakarta branch from 3792538 to df1695b Compare October 8, 2026 17:01

@Abacn Abacn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Abacn
Abacn merged commit 40852a7 into apache:master Oct 8, 2026
114 of 116 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants