Following dependency was missing <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-bean</artifactId> </dependency>
On Wed, Dec 23, 2020 at 11:53 PM Imran Raza Khan <[email protected]> wrote: > I am working on a code in which one processor is like > > public void process(Exchange exchange) throws Exception > { > exchange.getIn().setHeader("AMQ_PASSWORD", > exchange.getMessage().getBody(io.fabric8.kubernetes.api.model.Secret.class).getData().get("amq-password")); > } > > I thought to simplify this with following code in route > > ... > > .to("kubernetes-secrets:///?kubernetesClient=#kubernetesClient&operation=getSecret") > .setHeader("amq_pass", simple(" > ${body.getData.get[amq-password]} ")) > or > .setHeader("amq_pass", simple(" > ${bodyAs(io.fabric8.kubernetes.api.model.Secret).getData.get[amq-password]} > ")) > ... > > But all tries leads to following error > > [org.apa.cam.qua.mai.CamelMainRuntime] (Quarkus Main Thread) Failed to > start application: org.apache.camel.FailedToCreateRouteException: Failed to > create route nats-pub at: >>> Set > Header[nats_user, simple{ ${body.getData.get('amq-password')} }] <<< > in route: Route(nats-pub)[From[timer://ipc?repeatCount=1&delay=60000] ... > because of No language could be found for: bean > >
