2
votes

I have not been able to find in Spring Integration documentation the way how to define outbound channel adapter or gateway which would support consuming of multiple messages at once from PollableChannel.

Is it possible or I have to use aggregators to combine messages to a list?

2

2 Answers

3
votes

That's true. There is really no such a component, because any Messaging is designed to get deal just only with single message at a time do not impact other messages.

One channel may accept different messages from different systems, for different business logic, with different atomicity etc...

The EIP catalog doesn't provide something similar, but I think your requirement is like window or buffer from Reactive Streams.

Right, Aggregator can help here. You just need to have some artificial correlationKey (correlation-strategy-expression="1") and provide some batch release strategy.

There is some interest Batcher implementation in the Reactor Spring Extension too.

-1
votes

Spring integration has implementation of MessageChannels for this kinds of queues. One of the implementations is called "PublishSubscribeChannel" May be this is what you are looking for.

http://docs.spring.io/spring-integration/reference/html/messaging-channels-section.html