-
Notifications
You must be signed in to change notification settings - Fork 29
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
How to extend validation options for "Reactive Messaging for MicroProfile" connector ? #439
Comments
please attach a sample project reproducing the issue. I can't tell at this point if this requires extending lsp4mp or if relaxing lsp4mp validation is a better approach. @angelozerr? |
Thanks. To recreate:
|
I dont remember how this validation is working. I need to find time to understand again how it works. |
@scottkurz the liberty-kafka should be retrieved from https://github.com/OpenLiberty/open-liberty/blob/912749d6fee4cc44047d0841dda9897f5c2837df/dev/com.ibm.ws.microprofile.reactive.messaging.kafka/src/com/ibm/ws/microprofile/reactive/messaging/kafka/KafkaOutgoingConnector.java#L44 I have imported your project and KafkaOutgoingConnector is not in the classpath, perhaps it misses a dependency in your pom.xml? |
Thank you @angelozerr for explaining that. I see what you're saying. This is just a String in a properties file, so it's not required to compile or at runtime... but the validation needs to see it on the classpath to validate it. I still wonder if maybe the validation is too strict or needs to be adjusted, but I'm not arguing that yet. Let me first see what the pom.xml would look like. Thanks |
If you start the project is it working? I dont understand how it can work if it misses the liberty kafka connector on the classpath |
Within Liberty there's a different classloader structure than the one built by Maven. |
To fix your issue, your liberty tooling will need to add an extension to add this missing properties like we did with Quarkus LS JDT extension https://github.com/redhat-developer/quarkus-ls/tree/master/quarkus.jdt.ext which add Quarkus deploiement in classpath when properties are collected (see https://github.com/search?q=repo%3Aredhat-developer%2Fquarkus-ls%20deployment&type=code) Your extension could:
|
In OpenLiberty/liberty-tools-eclipse#500, we see an issue validating an MP config property:
mp.messaging.outgoing.systemLoad.connector=liberty-kafka
with description:
Invalid enum value: 'liberty-kafka' is invalid for type org.eclipse.microprofile.reactive.messaging.spi.Connector
This is LSP4MP version 0.10.0.
Would you envision adding a new option here to the core LSP4MP? An extension (or as part of the "client" pulling in LSP4MP) ?
Figured I'd just ask and see your first response before thinking too hard myself. Thank you.
The text was updated successfully, but these errors were encountered: