org.springframework.integration.annotation.Aggregator Java Examples

The following examples show how to use org.springframework.integration.annotation.Aggregator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AggregatorService.java    From rocketmq-binder-demo with Apache License 2.0 5 votes vote down vote up
@Aggregator(inputChannel = Sink.INPUT, outputChannel = AggregatorApplication.TEMP_INPUT)
public String receive(List<Message> messageList) {
	Random random = new Random();
	int batch = random.nextInt(100000);
	for (Message msg : messageList) {
		System.out.println(batch + " === " + msg);
	}
	return "aggregator result[" + batch + "]";
}
 
Example #2
Source File: DemoApplication.java    From spring-cloud-sleuth with Apache License 2.0 4 votes vote down vote up
@Aggregator(inputChannel = "words", outputChannel = "counts")
public int count(List<String> greeting) {
	this.aggregatorSpan = this.tracer.currentSpan();
	return greeting.size();
}
 
Example #3
Source File: EmployeeJobConfigMaster.java    From batchers with Apache License 2.0 4 votes vote down vote up
@Aggregator(sendPartialResultsOnExpiry = true, sendTimeout = RECEIVE_TIMEOUT, inputChannel = "inboundResults", outputChannel = "replyChannel",
        poller = @Poller(maxMessagesPerPoll = "5", fixedDelay = "10000"))
public List<?> aggregate(@Payloads List<?> messages) {
    return messages;
}