Author |
|
people Newbie
Joined: 25 March 2014 Location: United States
Online Status: Offline Posts: 4
|
Posted: 05 January 2015 at 12:13pm | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 05 January 2015 at 2:12pm | IP Logged
|
|
|
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 |
|
|
people Newbie
Joined: 25 March 2014 Location: United States
Online Status: Offline Posts: 4
|
Posted: 05 January 2015 at 3:34pm | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 06 January 2015 at 1:43am | IP Logged
|
|
|
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 |
|
|
people Newbie
Joined: 25 March 2014 Location: United States
Online Status: Offline Posts: 4
|
Posted: 09 January 2015 at 6:28am | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 09 January 2015 at 9:55am | IP Logged
|
|
|
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 |
|
|