Reputation: 1
Have following route in apache camel:
...
...
.pollEnrich()
.simple("""
imap://${exchangeProperty.imapEndpoint}
?delay=0
&initialDelay=0
&additionalJavaMailProperties=#bean:${exchangeProperty.imapAdditionalPropertiesName}
&bridgeErrorHandler=true&disconnect=false
&closeFolder=false
&delete=${exchangeProperty.imapDelete}
&unseen=true
&maxMessagesPerPoll=-1
&username=RAW(${exchangeProperty.imapUsername})
&password=RAW(${exchangeProperty.imapPassword})
""")
.aggregationStrategy(
AggregationStrategies.flexible()
.pick(ExpressionBuilder.messageExpression())
.condition(Objects::nonNull)
.accumulateInCollection(HashSet.class)
.storeInBody()
)
.end()
.process(imapProcessor)
.end();
From processing logs it seen that MailCOnsumer
reading all required emails from IMAP. But for some reason poolEnrich()
allways returns only one email in set.
Note: IMAP server is GMAIL.
How to make it to return all emails (aggregated)
Tried using to(..)
- IMAP is STORE not PROTOCOL.
Tried using enrich()
- same behavior as pollEnrich()
Used all AI - no luck... :(
Upvotes: 0
Views: 3