0
votes

I have two inbound-channel-adapter which collect files from two distinct sources.

I'd like to process the incoming files one at a time, by the same instance of service-activator and in the same thread. At the moment, since there are two distinct Poller, they are actually processed by two different threads concurrently.

I thought that using a queueChannel to feed my service-activator would have solved the problem but I don't want to introduce another Poller (and hence, another delay).

Any idea?

1

1 Answers

0
votes

Use an ExecutorChannel with an Executors.newSingleThreadExecutor().

You can also use a QueueChannel with a fixedDelay of 0; the poller blocks in the queue for 1 second by default (and can be increased - receiveTimeout) so with a 0 delay between polls, no additional latency will be added.