【发布时间】:2015-09-22 18:47:28
【问题描述】:
我一直在使用与 Spring 集成的 ImapIdleChannelAdapter 一些.. 并注意到它启动了 10 个任务调度程序线程。
我一直在检查 ImapIdleChannelAdapter 的文档,但无法找到一种方法来配置它在收听电子邮件收件箱时将启动多少线程。
这是我的 Spring 配置:
<int:channel id="receiveChannel" >
<int:dispatcher task-executor="threadPool" />
</int:channel>
<int-mail:imap-idle-channel-adapter id="imapAdapter"
store-uri="imaps://#{systemProperties['imaps.encoded.username']}:#{systemProperties['imaps.encoded.password']}@#{systemProperties['imaps.host']}:#{systemProperties['imaps.port']}/INBOX"
channel="receiveChannel" auto-startup="true" should-delete-messages="false" should-mark-messages-as-read="false"
java-mail-properties="javaMailProperties">
</int-mail:imap-idle-channel-adapter>
感谢您的帮助。
【问题讨论】:
标签: java multithreading spring