.aggregator(header(SURNAME_HEADER),
surnameAggregator).setHeader(TYPE_HEADER,
constant(BROTHERS_TYPE)).to("direct:joinBrothers");
// Join all brothers lists and remove surname and type headers
AggregatorType agg =
from("direct:joinBrothers").aggregator(header(TYPE_HEADER),
brothersAggregator);
agg.setBatchTimeout(2000L);
agg.removeHeader(SURNAME_HEADER)
.removeHeader(TYPE_HEADER)
.to("mock:result");
}
};
}