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 2021/03/16 13:39:26 UTC

[GitHub] [camel-k] barmyard opened a new issue #2139: Wiretap to Kamelet does not work in YAML

barmyard opened a new issue #2139:
URL: https://github.com/apache/camel-k/issues/2139


   I am observing errors while writing a YAML integration containing a wiretap to a Kamelet, here is a minimal example: This example should log "Hello from Camel K yaml" twice.
   ```yaml
   
   - from:
       uri: "timer:yaml"
       parameters:
         period: "1000"
       steps:
         - set-body:
             constant: "Hello Camel K from yaml"
         - wiretap:
             uri: "kamelet:logger?message=${body}"
         - to: "log:info"
   ```
   Where the logger Kamelet is just a simple sink Kamelet that logs:
   ```yaml
   apiVersion: camel.apache.org/v1alpha1
   kind: Kamelet
   metadata:
     name: logger
     namespace: default
     labels:
       camel.apache.org/kamelet.type: "sink"
   spec:
     definition:
       title: "Logger"
       description: Logger
       required:
         - message
       properties:
         message:
           title: Message
           description: Message
           type: string
     flow:
       from:
         uri: "kamelet:source"
         steps:
           - log: "{{message}}"
   ```
   
   After `kubectl apply -f ` and `kamel run`, I receive the following error:
   `WARN  [org.apa.cam.pro.WireTapProcessor] (Camel (camel-1) thread #3 - WireTap) Error occurred during processing Exchange[72E859E2207EED5-0000000000000005] wiretap to kamelet:logger?message=${body}. This exception will be ignored.: org.apache.camel.NoSuchEndpointException: No endpoint could be found for: kamelet://logger?message=Hello+Camel+K+from+yaml, please check your classpath contains the needed Camel component jar.`
   
   Changing the `wiretap` to a `to` statement works: ("Hello .. " is printed once every second)
   ```yaml
   
   - from:
       uri: "timer:yaml"
       parameters:
         period: "1000"
       steps:
         - set-body:
             constant: "Hello Camel K from yaml"
         - to:
             uri: "kamelet:logger?message=${body}"
   ```
   
   Changing the `kamelet:logger` to the baked in `log` also works: ("Hello .. " is printed twice every second)
   ```yaml
   - from:
       uri: "timer:yaml"
       parameters:
         period: "1000"
       steps:
         - set-body:
             constant: "Hello Camel K from yaml"
         - wiretap:
             uri: "log:info"
         - to: "log:info"
   ```
   
   Another interesing thing: when I remove the final `to: log:info` statement, it doesn't work either:
   ```yaml
   - from:
       uri: "timer:yaml"
       parameters:
         period: "1000"
       steps:
         - set-body:
             constant: "Hello Camel K from yaml"
         - wiretap:
             uri: "log:info"
   ```
   
   I am not sure if miss something, or it's a bug.  After a discussion on Zulip chat with @lburgazzoli, he mentions there might be an issue with load templates. Similar problems arise with components like `enhance`, and I suspect it might be the same issue.
   
   Mind you: I don't have a lot of Camel (K) experience, so I hope I formulated everything well.


----------------------------------------------------------------
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] squakez closed issue #2139: Wiretap to Kamelet does not work in YAML

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


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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



[GitHub] [camel-k] squakez commented on issue #2139: Wiretap to Kamelet does not work in YAML

Posted by GitBox <gi...@apache.org>.
squakez commented on issue #2139:
URL: https://github.com/apache/camel-k/issues/2139#issuecomment-908217565


   I've checked this problem and it was caused by the usage of `wiretap` which should be instead `wire-tap` in yaml language. If you try
   ```
         - wire-tap:
             uri: "log:wiretap"
   ```
   you should have it fixed. Please, reopen if you face any other problem.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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



[GitHub] [camel-k] heiko-braun commented on issue #2139: Wiretap to Kamelet does not work in YAML

Posted by GitBox <gi...@apache.org>.
heiko-braun commented on issue #2139:
URL: https://github.com/apache/camel-k/issues/2139#issuecomment-800269583


   > I don't have a lot of Camel (K) experience, so I hope I formulated everything well.
   
   @barmyard Perfect, thanks for the detailed description :)


----------------------------------------------------------------
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] heiko-braun commented on issue #2139: Wiretap to Kamelet does not work in YAML

Posted by GitBox <gi...@apache.org>.
heiko-braun commented on issue #2139:
URL: https://github.com/apache/camel-k/issues/2139#issuecomment-800268960


   //cc @nicolaferraro 


----------------------------------------------------------------
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