-
Notifications
You must be signed in to change notification settings - Fork 3
Dequeuing
Jef King edited this page Jun 5, 2015
·
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 mps | 1.4-114 mps | 8.5-1568 mps | Approximate throughput rate (messages per second per server) |
Cost | $0.07-$1.70 | $0.28-$9.10 | $1.70-$89.21 | Approximate cost per month (per server) |
public class Factory : ITaskFactory<Configuration>
{
public IEnumerable<IRunnable> Tasks(Configuration config)
{
var f = new BusDequeueFactory(config.ConnectionString);
foreach (var t in f.Tasks(config.Name, () => { return new MyProcessor(); }))
{
yield return t;
}
}
}