Created
June 20, 2023 14:56
-
-
Save davsclaus/42c78b3cd6af8de9b1b056211fac3214 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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