About me
  • 19🐱🐱 Crazy Cat Lady
  • Free and Open Source Advocate
  • 2008 Computer Science Graduate (Software Engineer)
  • 2009 Dijkstra A* Witch
  • 2012 Metadata Wrangler
  • 2013 OSGeo Charter Member
  • 2017-2019 OSGeo President
  • 2016 Women in Tech
  • Senior Software Engineer at RedHat
  • 2019 Integration Druid
  • 2020 Apache Software Foundation

Camel Quarkus

Camel K

Kamelets

Coding time


                from("timer:java?period=1000")
                  .setBody()
                    .simple("Hello World!")
                  .to("log:info");
            

          import java.util.Random;

          import org.apache.camel.builder.RouteBuilder;

          public class HelloWorld extends RouteBuilder {
            @Override
            public void configure() throws Exception {
                from("timer:java?period=1000")
                  .setBody()
                    .simple("Hello World!")
                  .to("log:info");
            }
          }
            

Coding time


                from("timer:java?period=1000")
                  //.setBody()
                  //  .simple("Hello World!")
                  // Generate random name
                  .process(processor)
                  .to("log:info");
            

                  Processor processor = new Processor() {

                    String[] firstname = new String[] { "Aleja", "Almerinda", "Ambrosia", "Benilda",
                    "Bercia", "Cayetana", "Ermisinda", "Escolástica", "Esmaragda", "Esmerencia"};
                    String[] lastname = new String[] {"Zuzunaga", "Sorní", "Sandemetrio", "Bonachera",
                    "Sazón", "Piesplanos", "Parraverde", "Alcoholado" };

                    Random r = new Random();

                    @Override
                    public void process(Exchange exchange) throws Exception {
                      StringBuilder name = new StringBuilder();
                      name.append(firstname[r.nextInt(firstname.length)]);
                      name.append(" ");
                      name.append(lastname[r.nextInt(lastname.length)]);
                       exchange.getMessage().setBody(name.toString());
                    }

                  };

            

Coding time


                public class ChatBotLogic {
                    public String chatBotProcess(String message) {
                        if( "do-not-reply".equals(message) ) {
                            return null; // no response in the chat
                        }

                        return "Received " + message;
                    }
                }
            

                from("telegram:bots?authorizationToken={{TELEGRAM_BOT_TOKEN}}")
                  .bean(ChatBotLogic.class)
                  .to("telegram:bots?authorizationToken={{TELEGRAM_BOT_TOKEN}}");