Skip to content

Instantly share code, notes, and snippets.

@jonathanvila
Created December 20, 2016 18:37
Show Gist options
  • Save jonathanvila/28da77deb3e756564d68896ef7f6ea90 to your computer and use it in GitHub Desktop.
Save jonathanvila/28da77deb3e756564d68896ef7f6ea90 to your computer and use it in GitHub Desktop.
public void configure() {
from("direct:products", "direct:prices").to("direct:combined");
from("direct:combined").
split(xpath("//Skus/Sku|//skus/sku")).
setHeader("SkuID", xpath("//Sku/@Id|//sku/@id", String.class)).convertBodyTo(String.class).
aggregate(header("SkuID"), new GroupedMessageAggregationStrategy()).completionSize(4).
log("Aggregated : ${body}").
to("mock:end");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment