Message queues are a core technology for building fast, reliable systems. This course teaches the fundamental messaging patterns with practical .NET implementations using MSMQ, ZeroMQ, cloud message queues, and WebSphere MQ.
Message queues are a core technology which all .NET developers and architects should be familiar with. They enable you to build high throughput systems which can scale beyond threads and processes, and which are inherently resilient - where different technologies can communicate with each other, and requests are never lost. This course will teach you the fundamental messaging patterns and explore popular queue implementations you can use with .NET: MSMQ, ZeroMQ, cloud messaging with Azure and AWS, and WebSphere MQ.
Message Queue Proof-of-Concept Hi. My name is Elton, and welcome to the Message Queue Proof-of-Concept. In this module we'll take a working solution that uses synchronous processing in a website and split out the presentation layer from the compute layer using a fire-and-forget message queue pattern to communicate between components. We'll use MSMQ as it's a simple quick option so we can evaluate the pattern and the technology without spending too much time building code for the PoC. The scope for our PoC is to verify the messaging gives us a working solution that is reliable in case of system failure and that it allows us to scale up to meet demand. Our demos for the course will all be around a very common scenario letting users unsubscribe from a mailing list and making the functionality responsive so a user can do it very quickly. We have an existing solution with an ASP. NET MVC website where users enter their email address and get unsubscribed from our list. The current code makes a synchronous call to process the unsubscribe request, which involves several other processes, and it takes too long to return to the user, so in the PoC we'll replace our synchronous code with asynchronous message queuing. The first task for the PoC will be to remove the unsubscribe processing in the website and replace it by sending an unsubscribe message to a queue, and the second task will be to retrieve and handle a message in a separate process from the website. This is fire-and-forget so the website sends the message, but it doesn't ask for any response. It just carries on with other processing.
Introducing MSMQ Hi. My name is Elton, and welcome to Introducing MSMQ. We used MSMQ for our message queue PoC, so we have seen it in action, but we're going to take a closer look in the next two modules. MSMQ is message queuing for Windows, and it's available on the Desktop and Server editions. MSMQ can work in isolation on individual machines or it can take advantage of features in Active Directory to provide security so accessing queues can be locked down to certain accounts or groups and discoverability. So, queues can be published to Active Directory, and clients can search for them without needing to know the actual host address. MSMQ is a well-specified messaging system, which supports the patterns we'll be using, fire-and-forget, request-response, and publish-subscribe, and it has more advanced functionality like rooting messages, triggering actions when messages are received, and messaging over HTTP so you can send messages across the internet. In this module we're going to look at MSMQ from the beginning, how it works, and what you can do with it. We'll deploy MSMQ on a fresh install of Windows looking at the configuration options for deployment and how you can manage queues. Then we'll see what we can do with the. NET client library and how easy it is to work with MSMQ in. NET to administer and use queues. And lastly we'll look at how we can implement our messaging patterns in MSMQ, and in the next module we'll build out the remaining two patterns into our unsubscribe solution. We won't cover all of the functionality of MSMQ, but we will use the main features that you're likely to use in your own messaging solutions.
Practical Cloud Messaging Hi. My name is Elton, and welcome to Practical Cloud Messaging, the next module of Message Queue Fundamentals in. NET. We've looked at how to use message queues with Azure and AWS, and in this module we're going to swap out our ZeroMQ messaging layer and replace it with the cloud. Both AWS and Azure support all our messaging patterns so we can completely replace our on-premise queues and do all our messaging through the cloud. To do that, we'll implement the IMessageQueue interface first with Azure Service Bus queues and topics, and then for Amazon Simple Queue Service and Simple Notification Service, so we'll have a better look at how pub-sub works over the cloud. Our IMessageQueue interface is abstract enough that it should support the new providers without any changes, so the final practical point we'll look at in this module is about performance. We've seen that messaging over the cloud is a lot more expensive in terms of the cost of sending and receiving messages, but the cloud queues should be able to support much greater scale, so we'll introduce parallelism into our demo solution and set up our message handlers so they can listen on queues and process messages with multiple threads. There's a lot of code to cover in this module, so we're going to get straight into it replacing our ZeroMQ messaging layer with Azure Service Bus. We'll start by implementing IMessageQueue to support request- response and fire-and-forget messaging using Service Bus queues, and we'll change the way our demo solution deals with temporary queues to create them as soon as they're requested rather than the first time they're used, which will make our implementation cleaner.