问题
I only have to consume mails from the mailbox which are from address x OR address y. How can i configure this in a camel uri?
I've only found the searchTerm configuration with 1 address(searchTerm.from=x)
回答1:
segment your route using Direct Component, it works like method call
for example:
<route>
<from uri="imap://admin@mymailserver_1"/>
<to uri="direct:processMail"/>
</route>
<route>
<from uri="imap://admin@mymailserver_2"/>
<to uri="direct:processMail"/>
</route>
<route>
<from uri="direct:processMail"/>
<to uri="bean:MailService?method=process"/>
<to uri="activemq:queue:mail.out"/>
</route>
Hope this helps.
来源:https://stackoverflow.com/questions/42766810/camel-mail-2-13-0-searchterm-how-to-configure-multiple-from-addresses