v0.1.0 · Apache 2.0

Lightweight EAI
for Java

Simplify and speed up the development of message-driven, asynchronous Java applications using Enterprise Integration Patterns.

OrderRouterFlow.java
FlowDefinition flow = Pipelite.defineFlow("order-router")
    .fromSource("http://orders/inbound")
    .wireTap("audit-log", "slf4j://audit?level=INFO")
    .filter("only-valid", "payload.status == 'CONFIRMED'")
    .transformPayload("to-invoice", OrderMapper::toInvoice)
    .toRoute(route -> route
        .when("payload.type == 'STANDARD'", "kafka://billing.standard")
        .when("payload.type == 'EXPRESS'",  "kafka://billing.express"))
    .withRetryChannel()
    .build();

Features

EAI patterns, without overhead!

Pipelite brings Enterprise Integration Patterns to Java without the complexity of heavyweight ESB frameworks.

Fluent Flow DSL

Define integration flows with a fluent Java builder — defineFlow(), fromSource(), toSink(). No XML, no annotations on domain objects.

Content-Based Routing

Route messages to different endpoints based on payload expressions with toRoute(). Fan out to multiple recipients with toRecipientList().

Transform & Filter

Apply payload transformations with transformPayload() and drop unwanted messages with expression-based filter() steps.

Wire Tap

Inspect messages in transit without interrupting the main flow. Use wireTap() to forward a copy to a logging or monitoring endpoint.

Retry & Error Channels

Attach withRetryChannel() for automatic message re-delivery on failure, or define a custom withErrorChannel() handler per flow.

Spring Boot Starter

Add @EnablePipelite to any @Configuration class and expose FlowDefinition beans. Autoconfiguration handles the rest.

How it works

A flow is a chain of steps

Each FlowDefinition connects a source endpoint to a sink through composable processing steps. The framework handles threading and lifecycle.

fromSource()

http://orders

wireTap()

slf4j://audit

filter()

expression

transformPayload()

mapper::map

toSink()

kafka://billing

Standalone

TimeLoggerFlow.java
public class TimeLoggerFlow {

  public static void main(String[] args) {
    PipeliteContext ctx = Pipelite.createContext();

    FlowDefinition flow = Pipelite
        .defineFlow("time-logger")
        .fromSource(
            "time://poll?period=1&timeUnit=SECONDS")
        .process("handler", msg -> {
            // process the message
        })
        .toSink("slf4j://logger?level=INFO")
        .build();

    ctx.registerFlowDefinition(flow);
    ctx.start();
  }
}

Spring Boot

TimeLoggerFlow.java
@SpringBootApplication
public class TimeLoggerFlow {

  @Configuration
  @EnablePipelite
  public static class Config {

    @Bean
    public FlowDefinition timeLoggerFlow() {
      return Pipelite
          .defineFlow("time-logger")
          .fromSource(
              "time://poll?period=1&timeUnit=SECONDS")
          .process("handler", msg -> {
              // process the message
          })
          .toSink("slf4j://logger?level=INFO")
          .build();
    }}
}

Channel Adapters

Connect anything with a URL

Endpoints are identified by URL scheme. Swap source or sink without changing your flow logic.

http:// HTTP

Embedded Undertow server. Expose or consume HTTP endpoints for ingress and egress.

kafka:// Kafka

Apache Kafka consumer and producer with JSON serialization built-in.

time:// Timer

Polling source that fires at a configurable period: time://poll?period=1&timeUnit=SECONDS.

link:// Internal

Connect flows together in-process. Chain output of one flow as input to another.

slf4j:// Logging

Sink messages directly to SLF4J loggers. Configurable level: ?level=INFO.

custom:// SPI

Implement ChannelAdapter via the SPI to register your own URL scheme and endpoints.

Get started

Add Pipelite to your project

Choose pipelite-core for standalone use, or pipelite-spring-starter for Spring Boot autoconfiguration.

pipelite-core (standalone)
<dependency>
  <groupId>io.pipelite</groupId>
  <artifactId>pipelite-core</artifactId>
  <version>0.1.0</version>
</dependency>
pipelite-spring-starter (Spring Boot 3)
<dependency>
  <groupId>io.pipelite</groupId>
  <artifactId>pipelite-spring-starter</artifactId>
  <version>0.1.0</version>
</dependency>