Basically, a poller is needed for queueChannel1 and spring integration can move the message to queueChannel2 afterwards.
@Bean
public IntegrationFlow testflow11() {
return f -> f.channel("queueChannel1")
.handle(new GenericHandler<String>() {
@Override
public String handle(String payload, MessageHeaders headers) {
System.out.println("[testflow11]: Processed " + payload);
return payload;
}
}, e -> e.poller(Pollers.fixedRate(0).maxMessagesPerPoll(-1)))
.channel("queueChannel2");
}