You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/09/23 10:06:54 UTC

[GitHub] [camel-k-runtime] nicolaferraro opened a new issue #500: Sink Kamelet not called

nicolaferraro opened a new issue #500:
URL: https://github.com/apache/camel-k-runtime/issues/500


   Trying this kamelet:
   
   ```yaml
   apiVersion: camel.apache.org/v1alpha1
   kind: Kamelet
   metadata:
     name: echo-sink
     label:
       camel.apache.org/kamelet.type: "sink"
   spec:
     definition:
       title: "Echo"
       description: "Replies with an echo message to each incoming event"
       properties:
         prefix:
           title: Prefix
           description: The prefix to prepend to the incoming event
           type: string
           default: "echo: "
     types:
       in:
         mediaType: text/plain
       out:
         mediaType: text/plain
     flow:
       from:
         uri: "direct:#property:routeId"
         steps:
           - log: "Called Kamelet"
           - set-body:
               simple: "#property:prefix${body}"
   ```
   
   Using that from an integratino like:
   
    ```groovy
   from('timer:tick')
     .setBody().constant('Hello 2')
     .log("calling kamelet ...")
     .to("kamelet:echo-sink")
     .log('${body}')
   
   ```
   
   From the logs, it does not seem the Kamelet to be called. It's printing "calling kamelet ...", then:
   
   ```
   source-sink-5bc9b7d645-ts9ds integration 2020-09-23 10:04:57,679 WARN  [org.apa.cam.com.tim.TimerConsumer] (Camel (camel-1) thread #0 - timer://tick) Error processing exchange. Exchange[840B1B4EC9BE9A7-0000000000000006]. Caused by: [org.apache.camel.component.direct.DirectConsumerNotAvailableException - No consumers available on endpoint: direct://echo-sink-840B1B4EC9BE9A7-0000000000000000. Exchange[]]: org.apache.camel.component.direct.DirectConsumerNotAvailableException: No consumers available on endpoint: direct://echo-sink-840B1B4EC9BE9A7-0000000000000000. Exchange[]
   source-sink-5bc9b7d645-ts9ds integration        at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:59)
   source-sink-5bc9b7d645-ts9ds integration        at org.apache.camel.component.kamelet.KameletEndpoint$KameletProducer.process(KameletEndpoint.java:158)
   source-sink-5bc9b7d645-ts9ds integration        at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:169)
   source-sink-5bc9b7d645-ts9ds integration        at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:404)
   source-sink-5bc9b7d645-ts9ds integration        at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)
   source-sink-5bc9b7d645-ts9ds integration        at org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)
   source-sink-5bc9b7d645-ts9ds integration        at org.apache.camel.processor.Pipeline.process(Pipeline.java:147)
   source-sink-5bc9b7d645-ts9ds integration        at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:287)
   source-sink-5bc9b7d645-ts9ds integration        at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:207)
   source-sink-5bc9b7d645-ts9ds integration        at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:76)
   source-sink-5bc9b7d645-ts9ds integration        at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
   source-sink-5bc9b7d645-ts9ds integration        at java.base/java.util.TimerThread.run(Timer.java:506)
   
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] davsclaus commented on issue #500: Sink Kamelet not called

Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #500:
URL: https://github.com/apache/camel-k-runtime/issues/500#issuecomment-698164823


   btw you can try with
       
       "direct:{{routeId}}"


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] nicolaferraro commented on issue #500: Sink Kamelet not called

Posted by GitBox <gi...@apache.org>.
nicolaferraro commented on issue #500:
URL: https://github.com/apache/camel-k-runtime/issues/500#issuecomment-697267739


   I put another issue here, since it's related to the consumers.
   
   If I change the route to:
   
   ```groovy
   from('timer:tick')
     .setBody().constant('Hello 2')
     .log("calling kamelet ...")
     .to("kamelet:echo-sink")
     .to("kamelet:echo-sink?prefix=Hello+World+")
     .log('${body}')
   
   ```
   
   I.e. using the same kamelet twice, then I get an error on Camel startup:
   
   ```
   [2] Caused by: org.apache.camel.FailedToStartRouteException: Failed to start route echo-sink-3D791105940A899-0000000000000001 because of Multiple consumers for the same endpoint is not allowed: direct://%23property:routeId
   [2]     at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRouteConsumers(InternalRouteStartupManager.java:317)
   [2]     at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartRouteConsumers(InternalRouteStartupManager.java:282)
   [2]     at org.apache.camel.impl.engine.InternalRouteStartupManager.safelyStartRouteServices(InternalRouteStartupManager.java:181)
   [2]     at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRoutes(InternalRouteStartupManager.java:115)
   [2]     at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2907)
   [2]     at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2740)
   [2]     at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2703)
   [2]     at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
   [2]     at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2469)
   [2]     at org.apache.camel.quarkus.main.CamelMain.doStart(CamelMain.java:75)
   [2]     at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
   [2]     at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:120)
   [2]     at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
   [2]     ... 10 more
   
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] davsclaus commented on issue #500: Sink Kamelet not called

Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #500:
URL: https://github.com/apache/camel-k-runtime/issues/500#issuecomment-698164823


   btw you can try with
       
       "direct:{{routeId}}"


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] lburgazzoli commented on issue #500: Sink Kamelet not called

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #500:
URL: https://github.com/apache/camel-k-runtime/issues/500#issuecomment-697375970


   Opened an upstream issue https://issues.apache.org/jira/browse/CAMEL-15572


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] lburgazzoli commented on issue #500: Sink Kamelet not called

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #500:
URL: https://github.com/apache/camel-k-runtime/issues/500#issuecomment-700041222


   @nicolaferraro I think we can close this as superseded by  https://github.com/apache/camel-k-runtime/issues/490 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] nicolaferraro commented on issue #500: Sink Kamelet not called

Posted by GitBox <gi...@apache.org>.
nicolaferraro commented on issue #500:
URL: https://github.com/apache/camel-k-runtime/issues/500#issuecomment-698248442


   > btw you can try with
   > 
   > ```
   > "direct:{{routeId}}"
   > ```
   
   Yes, that works. I've changed all examples to use it.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] nicolaferraro commented on issue #500: Sink Kamelet not called

Posted by GitBox <gi...@apache.org>.
nicolaferraro commented on issue #500:
URL: https://github.com/apache/camel-k-runtime/issues/500#issuecomment-698248442


   > btw you can try with
   > 
   > ```
   > "direct:{{routeId}}"
   > ```
   
   Yes, that works. I've changed all examples to use it.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] lburgazzoli commented on issue #500: Sink Kamelet not called

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #500:
URL: https://github.com/apache/camel-k-runtime/issues/500#issuecomment-697303190


   The issue is that `#property:routeId` don't get resolved.
   
   @davsclaus maybe this is because the resolution using that method, does not take into account the thread local values the templates uses to materialize the route ?
   
   Added a reproducer here https://github.com/apache/camel-k-runtime/pull/502


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] lburgazzoli closed issue #500: Sink Kamelet not called

Posted by GitBox <gi...@apache.org>.
lburgazzoli closed issue #500:
URL: https://github.com/apache/camel-k-runtime/issues/500


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org