Java mail listener using Spring Integration : mail isn't received by multiple app instances
问题 I'm using below code in a Springboot application: @Bean public IntegrationFlow mailListener() { return IntegrationFlows.from(Mail.imapInboundAdapter(receiver()), e -> e.poller(Pollers.fixedRate(60000).maxMessagesPerPoll(-1))) .<Message>handle(message -> logMail(message)).get(); } private org.springframework.messaging.Message<?> logMail(org.springframework.messaging.Message<?> message) { System.out.println("received a mail********** !"); // System.out.println(message.getPayload()); // process