【发布时间】:2019-06-04 03:41:41
【问题描述】:
我正在开发一个每周从 IMAP 服务器接收电子邮件并生成相关统计信息的应用程序。其中之一是具有相同主题的电子邮件数量。
我正在考虑使用重新排序器来存储来自服务器的所有消息,并在收到所有新消息时生成统计信息并最终单独发送消息。
但是我错过了sequence_number 和correlation_id,当消息在服务器上结束时,我找不到合适的方法来释放组。
这是我的integration-context.xml:
<int:channel id="startMailSync"/>
<int:control-bus id="start" input-channel="startMailSync"/>
<int:channel id="receiveChannel" datatype="javax.mail.internet.MimeMessage" />
<int-mail:inbound-channel-adapter
id="mailClient"
channel="receiveChannel"
java-mail-properties="javaMailProperties"
store-uri="imaps://[user]:[password]@mail.it/INBOX"
should-mark-messages-as-read="true"
should-delete-messages="false"
mail-filter-expression="from[0].address matches 'sender@sender.it'"
auto-startup="false">
<int:poller trigger="runOnceTrigger" max-messages-per-poll="100"/>
</int-mail:inbound-channel-adapter>
<util:properties id="javaMailProperties">
<prop key="mail.imap.socketFactory.class">javax.net.ssl.SSLSocketFactory</prop>
<prop key="mail.imap.socketFactory.fallback">false</prop>
<prop key="mail.store.protocol">imaps</prop>
<prop key="mail.debug">false</prop>
</util:properties>
<int:resequencer
input-channel="receiveChannel"
output-channel="a"
>
【问题讨论】:
标签: xml spring spring-integration