You might be queuing without knowing it
If you’ve ever run a nightly batch job to update entity statuses, send notification emails, or generate reports, then you’re already using your database as a kind of queue.
Every operation that causes a record to be included in a batch job is implicitly adding that record to a queue. Every time the batch job wakes up and processes those records, it is clearing the queue until the next run.
Here's the problem, though:
If an error occurs during batch processing, it can mean that you get called in at three in the morning to fix it before everyone comes in for the day.
Plus, as the business grows, often these batch jobs have to churn through more and more records taking more and more time until they no longer finish before the night is through.
Real-time asynchronous processing to the rescue
The trick to solving these problems is adopting a queued programming model where the regular batched processing happens asynchronously instead of nightly, but without any unnecessary delays and, most importantly, with a high-consistency / high-reliability safety net. No more nightly batch job; no more three o'clock wake-up calls.
The best part: you already have the infrastructure to support queues! NServiceBus supports several transports for queuing, including SQL Server - which is already optimized for performance to minimize any extra load on your system. There is no need to introduce a dedicated queuing system into your environment.
Build better systems
Learn how to build better and more reliable systems with asynchronous messaging and NServiceBus
Get started