// camel-k: language=java
import org.apache.camel.builder.RouteBuilder;
public class ArtemisIntegration extends RouteBuilder {
@Override
public void configure() throws Exception {
// Write your routes here, for example:
from("timer:java?period={{time:1000}}").routeId("java")
.setBody()
.simple("Hello Camel from ${routeId}")
.log("${body}")
.to("kamelet:jms-amqp-10-sink?destinationType=topic&destinationName=user1-dev&remoteURI=RAW(amqps://rhte-artemis-ssl-0-svc.tooling.svc.cluster.local:5673?transport.trustStoreLocation=/etc/ssl/jms-sink/client.ts&transport.trustStorePassword=password1!&transport.verifyHost=false&jms.username=admin&jms.password=password1!)");
}
}
Output:
2022-12-02 09:38:34,581 ERROR [io.qua.run.Application] (main) Failed to start application (with profile prod): java.lang.IllegalArgumentException: Could not find a suitable setter for property: remoteURI as there isn't a setter method with same type: java.lang.String nor type conversion possible: Invalid remote URI: RAW(amqps://rhte-artemis-ssl-0-svc.tooling.svc.cluster.local:5673?transport.trustStoreLocation=/etc/ssl/jms-sink/client.ts&transport.trustStorePassword=password1!&transport.verifyHost=false&jms.username=admin&jms.password=password1!)
at org.apache.camel.support.IntrospectionSupport.setProperty(IntrospectionSupport.java:845)
at org.apache.camel.impl.engine.DefaultBeanIntrospection.setProperty(DefaultBeanIntrospection.java:199)
at org.apache.camel.support.PropertyBindingSupport.doSetSimplePropertyViaReflection(PropertyBindingSupport.java:859)
at org.apache.camel.support.PropertyBindingSupport.setSimplePropertyViaReflection(PropertyBindingSupport.java:746)
at org.apache.camel.support.PropertyBindingSupport.doSetPropertyValue(PropertyBindingSupport.java:490)
at org.apache.camel.support.PropertyBindingSupport.doBuildPropertyOgnlPath(PropertyBindingSupport.java:342)
at org.apache.camel.support.PropertyBindingSupport.doBindProperties(PropertyBindingSupport.java:225)
at org.apache.camel.support.PropertyBindingSupport.access$100(PropertyBindingSupport.java:101)
at org.apache.camel.support.PropertyBindingSupport$Builder.bind(PropertyBindingSupport.java:1836)
at org.apache.camel.impl.DefaultModel.setPropertiesOnTarget(DefaultModel.java:843)
at org.apache.camel.impl.DefaultModel.lambda$addTemplateBeans$6(DefaultModel.java:548)
at org.apache.camel.util.function.Suppliers$1.get(Suppliers.java:48)
at org.apache.camel.support.SupplierRegistry.findByType(SupplierRegistry.java:102)
at org.apache.camel.support.DefaultRegistry.findByType(DefaultRegistry.java:312)
at org.apache.camel.component.jms.JmsComponent.doInit(JmsComponent.java:1040)
at org.apache.camel.support.service.BaseService.init(BaseService.java:83)
at org.apache.camel.support.service.ServiceHelper.initService(ServiceHelper.java:84)
at org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:927)
at org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:850)
at org.apache.camel.support.CamelContextHelper.resolveEndpoint(CamelContextHelper.java:123)
at org.apache.camel.reifier.SendReifier.resolveEndpoint(SendReifier.java:43)
at org.apache.camel.reifier.SendReifier.createProcessor(SendReifier.java:36)
at org.apache.camel.reifier.ProcessorReifier.makeProcessor(ProcessorReifier.java:838)
at org.apache.camel.reifier.ProcessorReifier.addRoutes(ProcessorReifier.java:579)
at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:236)
at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:74)
at org.apache.camel.impl.DefaultModelReifierFactory.createRoute(DefaultModelReifierFactory.java:49)
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:874)
at org.apache.camel.component.kamelet.KameletComponent$LifecycleHandler.createRouteForEndpoint(KameletComponent.java:405)
at org.apache.camel.component.kamelet.KameletComponent$LifecycleHandler.onContextInitialized(KameletComponent.java:419)
at org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2871)
at org.apache.camel.quarkus.core.FastCamelContext.doInit(FastCamelContext.java:172)
at org.apache.camel.support.service.BaseService.init(BaseService.java:83)
at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2568)
at org.apache.camel.support.service.BaseService.start(BaseService.java:111)
at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2587)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:253)
at org.apache.camel.quarkus.main.CamelMain.doStart(CamelMain.java:94)
at org.apache.camel.support.service.BaseService.start(BaseService.java:119)
at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:140)
at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot173480958.deploy_0(Unknown Source)
at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot173480958.deploy(Unknown Source)
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:103)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:67)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:41)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:120)
at io.quarkus.runner.GeneratedMain.main(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:60)
at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:31)
The same integration works when executed using camel/jbang
Reproducing steps:
ArtemisIntegration.java
Output:
The same integration works when executed using
camel/jbang