Skip to content

Instantly share code, notes, and snippets.

@davsclaus
Created June 20, 2023 14:56
Show Gist options
  • Save davsclaus/42c78b3cd6af8de9b1b056211fac3214 to your computer and use it in GitHub Desktop.
Save davsclaus/42c78b3cd6af8de9b1b056211fac3214 to your computer and use it in GitHub Desktop.
// camel-k: language=java
import org.apache.camel.builder.RouteBuilder;
public class split extends RouteBuilder {
@Override
public void configure() throws Exception {
// Write your routes here, for example:
from("timer:java?period={{time:1000}}")
.setBody()
.simple("A,B,C,D,E")
.log("Before split ${threadName}")
.split(body()).parallelProcessing().synchronous()
.log("Inside ${threadName}: ${body}")
.end()
.log("Done split ${threadName}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment