
The Competing Consumers Pattern
Applications running in the cloud should expect to handle a large number of requests. One method of dealing with large amounts of requests is to pass them through a message broker to a consumer service that handles these requests asynchronously. This helps ensure that requests are being processed without throttling or degrading the performance of our applications. The volume of these requests can vary over a period of time. Imagine that you’re a developer for an e-commerce website. The traffic you’ll receive during events like Black Friday or Boxing Day sales will be significantly than usual, with requests coming from multiple users that is difficult to predict. During peak hours, you may have to process hundred or thousands of requests per second, while other times demand may be significantly smaller. ...