Kong
Kong

Reputation: 9576

JavaMail's IdleManager - appropriate thread pool size

When using JavaMail's IdleManager to monitor IMAP folders for new messages what is the appropriate thread pool size?

Do I need one thread per watched folder, or will a smaller thread pool work?

If I wanted to watch 1,000 folders say, what would be an appropriate thread pool?

Upvotes: 0

Views: 206

Answers (1)

Bill Shannon
Bill Shannon

Reputation: 29971

Obviously you're going to need to tune this based on your environment. You need one thread for each Folder that you expect to simultaneously have new messages available, so it will depend on how "active" your Folders are. It will also depend on how much processing you're doing for each message, since a thread will be tied up while the message is being processed.

Upvotes: 1

Related Questions