Closed
Description
Technically, we can do even right now like this:
.gateway("processChannel", g -> g.async(true))
but this does nothing internally for the GatewayMessageHandler
since therefore no respective async condition for the AbstractMessageProducingHandler
:
if (this.async) {
boolean isFutureReply = reply instanceof CompletableFuture<?>;
ReactiveAdapter reactiveAdapter = null;
if (!isFutureReply) {
reactiveAdapter = ReactiveAdapterRegistry.getSharedInstance().getAdapter(null, reply);
}
if (isFutureReply || reactiveAdapter != null) {
Since GatewayMessageHandler
uses this contract interface:
@FunctionalInterface
public interface RequestReplyExchanger {
Message<?> exchange(Message<?> request) throws MessagingException;
}
Looks like we should introduce a CompletableFuture
-based exchanger.
More info in: https://stackoverflow.com/questions/79609414/spring-integration-recommended-splitter-aggregator-setup-for-async-subflow-rep.