Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET POP3

 AfterLogic Forum : MailBee.NET POP3
Subject Topic: Parallel receiving MailMessages Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
HPS
Newbie
Newbie


Joined: 06 August 2013
Location: Germany
Online Status: Offline
Posts: 8
Posted: 08 February 2017 at 3:27am | IP Logged Quote HPS

Hello,

we are using MailBee.NET POP3 (v10).

is it possible to process parallel downloads of messages (DownloadEntireMessage) on the same instance of the POP3-class?

We want to download messages on the same account without creating a new instance of the class, so that we spare the time for logIn on the new instances. We have to download multiple messages parallel, because we want to create a "bypass". "Small" messages should have the chance to be downloaded even if a "large" (+5MB) is downloading. If we download messages "one after one", a "large" message would block the cue.

I think this is not possible without creating multiple instances/logIns - or do you see a way to do parallel downloads on the same instance/login?

Greetings
Hans-Peter
Back to Top View HPS's Profile Search for other posts by HPS
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 5874
Posted: 08 February 2017 at 3:45am | IP Logged Quote Igor

You would need multiple threads for that. However, if particular POP3 server supports pipelining, you can use DownloadEntireMessages method to download multiple messages within a single operation, which greatly increases performance and reduces network traffic.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
HPS
Newbie
Newbie


Joined: 06 August 2013
Location: Germany
Online Status: Offline
Posts: 8
Posted: 08 February 2017 at 4:37am | IP Logged Quote HPS

Hello Igor,

thank you for your answer.

But can I do multithreading on the same instance of the pop3-Class to avoid creating new instances and new logIns?

(Call of DownloadEntireMessages in multiple threads on the same instance of the pop3 class).

Back to Top View HPS's Profile Search for other posts by HPS
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2171
Posted: 08 February 2017 at 4:51am | IP Logged Quote Alex

Hi,

You cannot have multi-threading on the same instance. This goes down to sockets. You cannot have multiple data streams simultaneously flowing over the same socket. You need to create a separate socket for each.

Maybe you should reconsider how your code downloads email. Maybe you should re-order your queue. For instance, you first check sizes of all messages you're about to download (this info is available in advance, like UIDs) and then you plan your download strategy. For instance, first you download small messages and the rest of the session you download larger ones.

Trying to open another POP3 connection to the same mailbox will often fail because POP3 protocol does not allow this (although some implementations do).

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
HPS
Newbie
Newbie


Joined: 06 August 2013
Location: Germany
Online Status: Offline
Posts: 8
Posted: 08 February 2017 at 7:41am | IP Logged Quote HPS

Hello Alex,

thank you for your answer. This hepls.

Greetings
Hans-Peter
Back to Top View HPS's Profile Search for other posts by HPS
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide