Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Queue

 AfterLogic Forum : MailBee.NET Queue
Subject Topic: Process the files in the Pickup Queue Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
people
Newbie
Newbie
Avatar

Joined: 25 March 2014
Location: United States
Online Status: Offline
Posts: 4
Posted: 05 January 2015 at 12:13pm | IP Logged Quote people

It seems like the Mailbee.NET queue is processing the files in the pickup folder randomly. As a result some times the newer files are processing and the old files still sit in the queue. Instead, we want it to process them in the order in which it received the files i.e., by date time. How to configure this?
Back to Top View people's Profile Search for other posts by people
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 05 January 2015 at 2:12pm | IP Logged Quote Alex

QueueRunner.cs in MailBee.NET Queue Core project uses FastDirectoryEnumerator.EnumerateFiles in its Run method. You can replace this with any other enumerating mechanism to get files in certain order.

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

Joined: 25 March 2014
Location: United States
Online Status: Offline
Posts: 4
Posted: 05 January 2015 at 3:34pm | IP Logged Quote people

Are you suggesting that we download the source code, modify the code, compile our own version Mailbee.Net Queue and install?

If so, how do I get the source code?

Thanks,

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

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 06 January 2015 at 1:43am | IP Logged Quote Alex

The source code is always there. The Visual Studio project is installed by the setup program, along with samples and so on. "Browse source code" button in MailBee.NET Queue Menu opens that folder.

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

Joined: 25 March 2014
Location: United States
Online Status: Offline
Posts: 4
Posted: 09 January 2015 at 6:28am | IP Logged Quote people

I changed the Run function QueueRunner.CS to the following. Basically, I added the OrderBy clause to the EnumerateFiles. But, I had to change the .NET framework the code uses to 4.5 from 2.0. Actually, changing it to 3.5 will be good enough. But, since upgrading it anyways, I upgraded to the latest. AfterLogic should provide this functionality as a configurable option rather than a code recompile and deploy option.

public void Run()
        {
            foreach (FileData f in FastDirectoryEnumerator.EnumerateFiles(_config.Queue.GetPickupFolderPath(), "*.EML").OrderBy(x => x.CreationTime))
            {
               _mailer.AddJob(f.Name, f.Path, true, null, null);
               if (_mailer.JobsPending.Count > 4096)
               {
                    RunBatch();
               }
            }

            if (_mailer.JobsPending.Count > 0)
            {
               RunBatch();
            }
        }
Back to Top View people's Profile Search for other posts by people
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 09 January 2015 at 9:55am | IP Logged Quote Alex

One of the reasons why MailBee.NET Queue is shipped with the source code is that for such kind of software it's virtually impossible to implement all the settings needed (at least without turning the project into a real monster). To give people freedom of adjusting everything they need we provide sources. For instance, you're asking about sending eml files in the same order they are generated. Other ask to send them at particular time or at particular time windows or based on domain name of recipients or senders with different priority, and so on and on.

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

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