From the course: Learning RabbitMQ: Efficient Message Queuing
Introducing the sample application - RabbitMQ Tutorial
From the course: Learning RabbitMQ: Efficient Message Queuing
Introducing the sample application
- [Instructor] The first thing we need is an application to send messages from. I've prepared a web application of a fictional travel agency. You can get the code from the courses GitHub repository. Each chapter where we write code has a corresponding branch, sometimes with the beginning and an end state. For this chapter, I'm working with the 0201 branch. To start the application run dotnet run --project WebApp-- launch-profile https. Next, you can control click on the https URL, and you should see the web application in your browser. Now go to find your tour page. Click on the backpack Cal learn more button, and you can book any of these tours you can see here. Next, fill in some information, and click on the book button. Now, nothing happened behind the scenes because this is a fictional agency, but we're going to send a message to our RabbitMQ service whenever the form is submitted. I've also added a simple option to cancel the booking, so fill in those details and click on the cancel button. Now let's have a quick look at the code. The only page where you can really book a tour is the BackpackCal.cshtml page. It contains links to the booking page, and each link adds the tour name to the query string. If we look at the booking model, we can see that the tour name property is set whenever we load the page in our browser. In the booking page, we can see that we can show the tour name, which is now set in our model. We can also see that there's a form that will post to the book method of the booking controller. In this form, we have three input fields, a hidden input for the tour name, and a text input for our name and our email address. When we submit this form, the booking controller is called. The booking controller has two methods, book and cancel. In this simple web app, we're taking the values from the form and redirecting to the booking confirmed or booking canceled pages. We're also adding the form values to the query string so we can display them on the confirmation or cancellation pages. It's in this booking controller that will send out a message when a booking has occurred or has been canceled.
Contents
-
-
-
-
Introducing the sample application2m 22s
-
(Locked)
Publish to a RabbitMQ exchange4m 39s
-
(Locked)
Consuming from a RabbitMQ exchange4m 5s
-
(Locked)
Filter messages with direct exchanges5m 8s
-
(Locked)
Filter messages with topic exchanges5m 55s
-
(Locked)
Filter messages with headers exchanges6m 45s
-
(Locked)
Challenge: A simple chat application1m 10s
-
(Locked)
Solution: A simple chat application5m 20s
-
(Locked)
Challenge: Chatrooms1m 13s
-
(Locked)
Solution: Chatrooms2m 17s
-
-
-