Skip to content

Conversation

@lmmhbt
Copy link
Contributor

@lmmhbt lmmhbt commented Sep 26, 2025

Summary

This PR replaces the Paho MQTT library with the HiveMQ MQTT library.

Issue

As mentioned in #6851 the Paho MQTT library should be replaced as decided in dev meeting.
Should be tested by HSL.

Unit tests

It is hard to test by unit tests and the change has to be tested by HSL anyway.

@lmmhbt lmmhbt requested a review from a team as a code owner September 26, 2025 14:38
@jessicaKoehnke jessicaKoehnke added the +Skip Changelog This is not a relevant change for a product owner since last release. label Sep 26, 2025
@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

❌ Patch coverage is 0% with 51 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.10%. Comparing base (69dfcbe) to head (40fcc1e).
⚠️ Report is 56 commits behind head on dev-2.x.

Files with missing lines Patch % Lines
...rip/gtfs/updater/mqtt/MqttGtfsRealtimeUpdater.java 0.00% 51 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6906      +/-   ##
=============================================
- Coverage      72.10%   72.10%   -0.01%     
+ Complexity     19673    19671       -2     
=============================================
  Files           2125     2125              
  Lines          79533    79539       +6     
  Branches        8051     8051              
=============================================
- Hits           57350    57348       -2     
- Misses         19346    19354       +8     
  Partials        2837     2837              

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@optionsome optionsome self-requested a review September 30, 2025 09:40
@optionsome optionsome added the !Technical Debt Improve code quality, no functional changes. label Sep 30, 2025
Copy link
Contributor

@jessicaKoehnke jessicaKoehnke left a comment

Choose a reason for hiding this comment

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

When the port issue is resolved, messages seem to be coming through. So in general this should work.

Mqtt5AsyncClient asyncClient = Mqtt5Client.builder()
.identifier("OpenTripPlanner-" + UUID.randomUUID())
.serverHost(parsedUrl.getHost())
.serverPort(parsedUrl.getPort())
Copy link
Contributor

Choose a reason for hiding this comment

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

I tried this out with the example config. The port is missing in the configuration, which results in URI#getPort returning -1. That leads to this not working. You have to only set the port if it's not equal to -1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I added a check for the port.

@optionsome optionsome added the Digitransit Test Feature is under testing in Digitransit environment(s) label Oct 3, 2025
@optionsome
Copy link
Member

I tested this in our dev and seems to work as well as the previous library. I can approve this when #6906 (comment) is fixed.

@optionsome
Copy link
Member

I'm not sure if we should or shouldn't generate a changelog entry from this pr.

@optionsome optionsome added this to the 2.9 (next release) milestone Oct 7, 2025
@optionsome optionsome merged commit 502028c into opentripplanner:dev-2.x Oct 7, 2025
8 checks passed
@optionsome
Copy link
Member

All the relevant parties already know about this change so for that reason alone, I decided that the changelog entry isn't needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Digitransit Test Feature is under testing in Digitransit environment(s) +Skip Changelog This is not a relevant change for a product owner since last release. !Technical Debt Improve code quality, no functional changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants