lburgazzoli commented on issue #1579:
URL: https://github.com/apache/camel-k/issues/1579#issuecomment-651820735


   Here an example of a working code:
   
   ```yaml
   - from:
       uri: "timer:clock"
       parameters:
         period: "1000"
       steps:
         - set-body:
             constant: "foo"
         - process:
             ref: "toUpper"
         - to: log:info
   ```
   
   ```java
   import org.apache.camel.Processor;
   import org.apache.camel.BindToRegistry;
   
   public class MyConfigurer {
       @BindToRegistry
       public Processor toUpper() {
           return e -> e.getMessage().setBody(
               e.getMessage().getBody(String.class).toUpperCase()
           );
       }
   }
   ```
   
   tested on OpenShift with the following command:
   
       kamel run --dev --name example routes.yaml MyConfigurer.java
   


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to