eclipse-paho / eclipse-paho/paho.mqtt.java

Support GraalVM native images

Open
#963 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.3k
Forks
919
PR merge metrics
No merged PRs in 30d

Description

Hello,

I'm trying to make the spring integration mqtt support work in a GraalVM native image context. It breaks in eclipse paho's amazing (thank you for the good work) mqtt client as there some places where reflection is required and where resources are loaded from the classpath.

I originally submitted some proposed changes to the spring integration project but they wisely forwarded me here to you.

Here's the original issue:

https://github.com/spring-projects/spring-integration/issues/3900

GraalVM will look for .json Config files in the `META-INF/native-image/` of all jars it finds on the classpath. You could ship those with no code changes and help me get at least my [example](https://github.com/spring-tips/spring-integration-mqtt-and-hivemq) working.

I link to some code in the Spring Integration issue to which I've linked you that programmatically contributes the configurations my app needed to work in a GraalVM native image context. It would be straightforward to translate that into static `.json` files and add those to your project. I might give it a go myself...

Thanks for your work and for your consideration

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.