1
votes

I'm using String Integration DSL mail to receives email from a POP3s mail server. After few hours I see the poller stops polling the mail server and do not process the email. I can login to mail server and see the emails are their in the mail server. Could you please review the below and let me know what incorrect here

 @Bean
    public IntegrationFlow emailFlow() {
    return IntegrationFlows
        .from(Mail.pop3InboundAdapter(config.getMailUri())
                .javaMailProperties(p -> 
    emailInflowConfiguration.javaMailProperties(p))
                .embeddedPartsAsBytes(true).maxFetchSize(1)

    .shouldDeleteMessages(true)
                .javaMailAuthenticator(config.mailAuthenticator()),
            e -> e.autoStartup(true)
                .poller(p -> p.fixedDelay(5000,
                    1000)))
        .channel(MessageChannels.direct("pop3Channel"))
        .handle("pop3Handler", "handleMessage")
        .get();
  }
1

1 Answers

0
votes

We need to see thread dump to determine the waiting threads and where.

Usually thread pool is exhausted when there is a component waiting for reply but there is no one from downstream. Not likely it is with your code snippet. So, we definitely need more information. For example what does that pop3Handler do?