Babel :: Experimental :: Camel :: Lambda

Babel experimental modules such as Java API

License

License

GroupId

GroupId

io.xtech.babel
ArtifactId

ArtifactId

babel-camel-lambda
Last Version

Last Version

0.6.0
Release Date

Release Date

Type

Type

jar
Description

Description

Babel :: Experimental :: Camel :: Lambda
Babel experimental modules such as Java API

Download babel-camel-lambda

How to add to project

<!-- https://jarcasting.com/artifacts/io.xtech.babel/babel-camel-lambda/ -->
<dependency>
    <groupId>io.xtech.babel</groupId>
    <artifactId>babel-camel-lambda</artifactId>
    <version>0.6.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.xtech.babel/babel-camel-lambda/
implementation 'io.xtech.babel:babel-camel-lambda:0.6.0'
// https://jarcasting.com/artifacts/io.xtech.babel/babel-camel-lambda/
implementation ("io.xtech.babel:babel-camel-lambda:0.6.0")
'io.xtech.babel:babel-camel-lambda:jar:0.6.0'
<dependency org="io.xtech.babel" name="babel-camel-lambda" rev="0.6.0">
  <artifact name="babel-camel-lambda" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.xtech.babel', module='babel-camel-lambda', version='0.6.0')
)
libraryDependencies += "io.xtech.babel" % "babel-camel-lambda" % "0.6.0"
[io.xtech.babel/babel-camel-lambda "0.6.0"]

Dependencies

compile (5)

Group / Artifact Type Version
io.xtech.babel : babel-camel-core_2.10 jar 0.6.0
org.slf4j : slf4j-api jar 1.7.3
org.slf4j : slf4j-log4j12 jar 1.7.3
log4j : log4j jar 1.2.16
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Babel experimental

Build Status

Master: Build Status Coverage Status

This project contains future improvement of the Babel project:

  • Babel Camel Lambda : a java 8 DSL for Apache Camel

Those projects are still into prototyping or into test phase.

If you have any feedback or comment, please post it on the Babel google group: https://groups.google.com/forum/#!forum/babel-user

Babel Camel Lambda

Babel Camel Lambda is a DSL for Apache Camel provided for Java users

In order to use the Babel DSL for Camel with Java, add the following to your maven dependencies:

<dependency>
    <groupId>io.xtech.babel</groupId>
    <artifactId>babel-camel-lambda</artifactId>
    <version>BABEL_VERSION</version>
</dependency>

Then, you may create your route using the DSL

import io.xtech.babel.camel.lambda.RouteBuilder;

RouteBuilder routeBuilder = new RouteBuilder() {
    @Override
    public void configure() {
        //take messages from direct input, transforming their body into String
        from(source("direct:input")).as(String.class).
                //computes the lenght of the string
                processBody((str) -> str.length()).
                //routing the exchanges
                choice((w) -> {
                        //if the length is 3 to output1
                        w.when((O) -> O == 3).to(sink("mock:output1"));
                        //otherwise to output2
                        w.otherwise().to(sink("mock:output2"));
        });
    }
};
io.xtech.babel

Crossing-Tech SA

Versions

Version
0.6.0