[ https://issues.apache.org/jira/browse/CAMEL-19243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17708409#comment-17708409 ]
Andrea Cosentino commented on CAMEL-19243: ------------------------------------------ This is not the concept of Kamelets and adding that parameter is not in the aim of Kamelets. So I don't think this is a solution and I think it would just an ugly workaround for supporting your use case. > KameletConsumerNotAvailableException > ------------------------------------ > > Key: CAMEL-19243 > URL: https://issues.apache.org/jira/browse/CAMEL-19243 > Project: Camel > Issue Type: Bug > Components: camel-kamelet > Affects Versions: 3.20.3 > Reporter: Raymond > Priority: Minor > > I would like to use the Kamelets from the Kamelet catalog: > [https://camel.apache.org/camel-kamelets/3.20.x/index.html] > I have added the Kamelets maven dependency to my project > [https://mvnrepository.com/artifact/org.apache.camel.kamelets/camel-kamelets] > And then use it within a route using the Kamelet component: > {code:java} > <route id="example"> > <from uri="kamelet:timer-source?message=hello&period=10000"/> > <to uri="log:foo"/> > </route> {code} > > This gives the following error: > {code:java} > 2023-04-03 15:50:03.073 ERROR 40304 --- [ - timer://tick] > o.a.c.p.e.DefaultErrorHandler : Failed delivery for (MessageId: > 7E14905736F56C0-000000000000001C on ExchangeId: > 7E14905736F56C0-000000000000001C). Exhausted after delivery attempt: 1 > caught: > org.apache.camel.component.kamelet.KameletConsumerNotAvailableException: No > consumers available on endpoint: kamelet://sink?routeId=timer-source-1. > Exchange[7E14905736F56C0-000000000000001C]Message History > --------------------------------------------------------------------------------------------------------------------------------------- > Source ID > Processor Elapsed (ms) > timer-source.kamelet.yaml:64 timer-source-1/timer-source-1 > from[timer://tick?period=10000] 481757935 > timer-source.kamelet.yaml:70 timer-source-1/setBody6 > setBody[constant{{{message}}}] 1 > timer-source.kamelet.yaml:72 timer-source-1/setHeader6 > setHeader[Content-Type] 0 > timer-source.kamelet.yaml:75 timer-source-1/to15 > kamelet://sink?routeId=timer-source-8 0Stacktrace > ---------------------------------------------------------------------------------------------------------------------------------------org.apache.camel.component.kamelet.KameletConsumerNotAvailableException: > No consumers available on endpoint: kamelet://sink?routeId=timer-source-1. > Exchange[7E14905736F56C0-000000000000001C] > at > org.apache.camel.component.kamelet.KameletProducer.process(KameletProducer.java:78) > at > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:172) > at > org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:477) > at > org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:181) > at > org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:59) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:165) > at > org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:392) > at > org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:210) > at > org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:76) > at java.base/java.util.TimerThread.mainLoop(Timer.java:556) > at java.base/java.util.TimerThread.run(Timer.java:506)2023-04-03 > 15:50:03.074 WARN 40304 --- [ - timer://tick] > o.a.camel.component.timer.TimerConsumer : Error processing exchange. > Exchange[7E14905736F56C0-000000000000001C]. Caused by: > [org.apache.camel.component.kamelet.KameletConsumerNotAvailableException - No > consumers available on endpoint: kamelet://sink?routeId=timer-source-1. > Exchange[7E14905736F56C0-000000000000001C]] > {code} > Looking at the source of the timer-source Kamelet this is logical: > [https://github.com/apache/camel-kamelets/blob/main/kamelets/timer-source.kamelet.yaml] > It has a line: > to: kamelet:sink > I'm not sure what this "kamelet:sink" does (all kamels from the catalog have > it)? When I remove it or change it with another uri (like direct:x) and load > the yaml from a custom location then the kamelet works. > Is this a bug? Is this as intended? > In other words, how can I use the kamelets from the catalog within my routes? > And is there a way to remove or overwrite the kamelet:sink? -- This message was sent by Atlassian Jira (v8.20.10#820010)