-
Notifications
You must be signed in to change notification settings - Fork 3
Dequeuing
Jef King edited this page Feb 1, 2016
·
20 revisions
There are several ways to achieve dequeuing; but I would suggest looking at the Dequeue Factory. This creates the queue, and then maintains dynamic frequency, batch sizing and number of threads polling.
By using the factory, you are able to specify dynamic characteristics of the dequeuing; see the table below to understand the aspects of each priority.
Low | Medium | High | Definition | |
---|---|---|---|---|
Throughput | 0.2-9 | 0.5-102.4 | 8.5-800 | Approx. throughput rate (msgs per second per task) |
Cost | $0.07-$1.70 | $0.21-$10.20 | $1.70-$63.72 | Approx. cost per month (per task) |
public class Factory : ITaskFactory<Configuration>
{
public IEnumerable<IRunnable> Tasks(Configuration config)
{
var tasks = List<IRunnable>();
var f = new DequeueFactory("Connection String");
tasks.AddRange(f.Dequeue<CompanyProcessor, CompanyModel>("queue-name", QueuePriority.Medium));
return tasks;
}
}