8000 camel-examples/main-lambda at main · apache/camel-examples · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Camel Example Main Lambda

This example demonstrates how to use LambdaRouteBuilder as a way of defining Camel routes using lambda style.

rb -> rb.from("timer:foo").log("Hello Lambda");

The LambdaRouteBuilder is a functional interface that makes defining routes with lambda style easy. All you need to do is to create a method that returns LambdaRouteBuilder and mark the method with @BindToRegistry or if using Spring Boot @Bean or @Produce for CDI/Quarkus.

See the MyConfiguration.java for the configuration and Camel routes are set up.

Multiple routes can be defined by having multiple methods.

Build

First compile the example by executing:

$ mvn compile

How to run

You can run this example using

$ mvn camel:run

Help and contributions

If you hit any problem using Camel or have some feedback, then please let us know.

We also love contributors, so get involved :-)

The Camel riders!

0