On Sun, Apr 23, 2023 at 3:46 PM Ivan Tam <[email protected]> wrote:
>
> 2023-04-23 11:33:58.277 INFO 1493992 --- [ main]
> org.apache.camel.main.MainSupport : Apache Camel (JBang) 3.20.1 is
> starting
> 2023-04-23 11:33:58.427 INFO 1493992 --- [ main]
> org.apache.camel.main.MainSupport : Using Java 17.0.6 with PID
> 1493992. Started by devname in /home/devname/examples/test-kamelet
> Caused by: org.apache.camel.FailedToStartRouteException: Failed to start
> route test-sink-1 because of Multiple consumers for the same endpoint is not
> allowed: kamelet://source?routeId=test-sink-1
> at
> org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRouteConsumers(InternalRouteStartupManager.java:376)
> ~[camel-base-engine-3.20.1.jar:3.20.1]
I was able to run your code using Java 11, can you try with it ?
I think the way wireTap was designed, you should have a "direct"
endpoint to wiretap into it, similar to:
from("timer:abc?period=3000")
.setBody().constant("1")
.setHeader("main_cid").constant("1234")
.wireTap("direct:tap")
.setHeader("main_cid").constant("2345")
.wireTap("direct:tap")
.setBody().constant("2")
.log("${body}");
from("direct:tap")
.delay(1000)
.to("kamelet:log-sink?message=${header.main_cid}");
Then you should be able to run with java 17.
--
Claudio Miranda
[email protected]
http://www.claudius.com.br