Learn and Understand RabbitMQ | Niyazi Erdoğan | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

16 Lessons (1h 10m)
    • 1. Welcome

    • 2. About This Class

    • 3. Installing RabbitMQ and Management Plugin on Windows

    • 4. Installing RabbitMQ and Management Plugin on MacOS

    • 5. First Look with RabbitMQ Admin

    • 6. Creating Queue, Exchange and Binding and Publishing Message

    • 7. What is Messaging and Why We Need It?

    • 8. Messaging Protocols

    • 9. What is AMQP and What It Solves?

    • 10. Meet RabbitMQ

    • 11. 4 Actors of Messaging with RabbitMQ

    • 12. Exchanges

    • 13. Queues

    • 14. Topics

    • 15. Bindings

    • 16. RabbitMQ vs Other MQs

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

- "RabbitMQ is the most widely deployed open source message broker."  - Pivotal Software, 2018

Join me in this class to learn ins and outs of RabbitMQ!

If you want to learn RabbitMQ and how to get ready to develop with it using Java and Spring AMQP, this is the class you need! 

From Exchanges to Queues, Bindings to Message Listeners, we'll start by learning the pillars, corner stones of RabbitMQ and build on top of them with practical development for all these concepts using Java and Spring! 

I will walk you through the starting from scratch, the messaging itself! We'll discover what messaging means and how it affects our architectural decisions and design considerations. Next up is the AMQP, Advanced Message Queueing Protocol. We'll discover the benefits and reasons behind the popularity of AMQP and how it shaped the architecture of RabbitMQ from messaging concepts to client platforms making use of it. 

While discovering the advantages of AMQP, we'll then start discovering RabbitMQ and its architecture. We'll learn Queues, Exchanges, Bindings, Routings, Publishers, Subscribers and much more about RabbitMQ!

After meeting with RabbitMQ through the concepts that it puts on the table, we'll start preparing our environment for running RabbitMQ and developing applications using it. We'll install all the necessary software for RabbitMQ and have it up and running on our machines both on Windows and MacOS. 

When we finish preparing our environment for RabbitMQ, we'll start discovering by RabbitMQ Management Dashboard. We'll see and learn how RabbitMQ Dashboard helps us easily monitor and manage our RabbitMQ server. We will then send our first ever message to RabbitMQ! After sending our message, we'll learn how to create Queues, Exchanges and Bindings between them.

Below are some of the key metrics for RabbitMQ; if you're still hesitant to take this course, please read these carefully:

  • RabbitMQ is the most widely deployed open source message broker or messaging middleware in other terms.

  • With more than 35,000 production deployments of RabbitMQ world-wide at small startups and large enterprises, RabbitMQ is the most popular open source message broker.

  • RabbitMQ is lightweight and easy to deploy on premises and in the cloud. It supports multiple messaging protocols. RabbitMQ can be deployed in distributed and federated configurations to meet high-scale, high-availability requirements.

  • RabbitMQ runs on many operating systems and cloud environments, and provides a wide range of developer tools for most popular languages.

I hope I'll be seeing you in the class to teach you everything you need to understand and get ready to develop applications with RabbitMQ! I guarantee that you'll learn a lot from this class and I hope to see you there!

Meet Your Teacher

Teacher Profile Image

Niyazi Erdoğan

Sofware Engineer over 10+ years


Hello, I'm Niyazi. Software Engineer with over !0+ years of experience in various industries including but not only Telecommunications, Finance, Heavy Industries, E-commerce and more.

I've become a part of Skillshare because what I believe is that the only way to grow and nurture the information is to spread it!

Join my classes and I'll try my best to share my hands-on experiences!

See full profile

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Welcome: Hi. Welcome to my Courson Learning Rabbit. MQ A super nous messaging with Joe and spring. In this course, we're going to die deep into the world off rabid MQ, the famous and one of the most popular open source message Queues in the gel eco system will. Actually, it is widely used in almost any environment, from embedded systems to cloud environments. Rabbit mq can be used and deployed everywhere to talk about the features. And what do we have? What rabbit? MQ! I'll see you on the next video. 2. About This Class: No, let's talk about what we're going to cover in this course, and this course we're going to start by the were basic the fundamental knowledge for any messed broker, and that is messaging. So we're going to start by what the messaging means in software world and why we actually need it. And after that, we're going to take a look at messaging protocols such as M. Q. T T. After we finish with, the protocols were going to take a closer look at the A M Q p. A synchronised message green protocol. And finally we're going Teoh Meath, Wet Rabbit, MQ! The popular message cream protocol for almost any environment that we have. And after we first met with Rabbit MQ. We're going to start with queues, topics exchanged and more. We're going to learn the fundamental concepts over I be named Q. And these are very important topics in the scores. I can't stress this enough, so make sure to study these sections very well because we're going to use that information throughout the course. After we learned to fundamentals off Rabbit named Q and Messaging, we're going to take a comparison off message queuing frameworks and applications such as Kafka, Camel Rabid, MQ. Active in Q and more. After we finish our discussions about exchanges, accused bindings and much more, we're going to start implementing Rabbit MQ. With our coat using, of course, Joe and Spring, we will learn how to use rabbit template for sending both simple and complex messages. I'll be showing you all the ways of using rabbit template and just wait up for that after we learned how to send messages would rather template. We're going to move forward with our implementations, such as configuring cues, exchanges, bindings and much more from coat. We're going to be implementing listeners and many other constructs of rabid mq so that we can use it in our both professional and personal projects. After learning how to configure cues, exchanges, bindings and much more, we're going to realize an asynchronous scenario with two different applications from one application. We're going to be publishing a message to a specific routing key and an exchange from the other application. We're going to be receiving that message and processing it. It's going to be a were useful exercise, and I'll be expecting to see you there. So without further ado, I'll be seeing you on the next section 3. Installing RabbitMQ and Management Plugin on Windows: So let's start by installing rabbit MQ on windows and specifically Windows 10. So I'm opening up a browser window and from there I'm going to search for Rabbit. Mq. After that, I'm going to d downloads section off the official website, and from there I'm going to go to windows with installer. This is the easiest way to instill rabbit mq on windows. So I'm picking any of them because they're both identical, just different sources, and I'm downloading it, Okay, it is being downloaded. And as you can see, we have to install Erlanger on our computer so that rabid mq camera properly otherwise it just simply doesn't work. So to do that as we see the direction right here, let's just go to download of er lank for windows. And from there, I'm just going to simply download or lank and all picked e 64 bet version. All right, so what we should do now is we need to wait for download of the Erling and then re first install or lank. And after that, who is Stal Rabbit? Mq itself. All right. Download of our Erland distribution is complete. So now let's install it. I'm going to hit, run and select. Yes. And from there I'm not picking anything. And I'm going to go with the default installation and hit next. All right. It is being installed, and it is prompting me to install C plus plus distribution and also install that because it's an also a required component. All right, it's complete. So now our Erlanger installation is going on, All right. Oh, Lange's is fault not. Let's close. This and Randy Rabbit, MQ server installation. All hit, Run and select. Yes, and from there I'm going to install Rabbit mq! As as service, which has the point, offers installer. So I'll just pick none. And the default is selected right here, as you can see, and I'm going to get next and distal, and I'm just going to allow every connection for her lank to have the rabid MQ working properly. So I'll say, allow access, and again, I'm going to do that for the other distribution. And here we go, Robert M que installation as now complete to wear. If I that if it's installed properly and working properly as a service, I'll just go to search and look for services and Here we go. And in there I'm going to look for rabid M Q. And as you can see here, a rabbit MQ is now running. Robert M que server is running on windows as a service. 4. Installing RabbitMQ and Management Plugin on MacOS: to install Rabbit MQ on Mac OS. Let's first search for Rabbit mq and in the results, let's just go to downloads and installation. Indeed, Demel section Let's select the Mac OS, and we have a couple of options here. 1st 1 is homebrew. They're stand alone and the generate UNIX. So the best option that you should also use and I recommend, is the homebrew option, while depending on the system that you have, Homebrew is the actually missing package manager for Mac OS. So let's take a look at the Web page off Homebrew to learn more about it. And, as you can see, it has the Web page as brood. That s H the Homebrew. As I said, the missing package manager for Mac OS to install it, all you have to do is just copy the script and run in your command line or terminal in Mac OS. And after finishing with the Homebrew installation, just go back to rabid mq and followed the way with brew for doing that. Since I already have home ruin my machine, I'll just open up a terminal window and I'll just follow the lines. Follow the guidelines from Rabbit mq. So to do that all first update, my brew and then I'm simply going to bruv is the whole and rabid Mq. And Robert m que is being downloaded and installed. All right? Ah, rabbit. Mq insulation on Mac os is now complete. So to check out rabbit MQ management you I And to start with Robert MQ command line interface. All the seeing you in the next videos. 5. First Look with RabbitMQ Admin: all right, we have completed installations of Rabbit and Queue Server on our systems, both on Windows and Mac OS. So to move on with Robert M. Q and start discovering it will first have to start our rabid MQ server on our machine to do that. Ah, locate the binary in solution of rabid mq. And to do that, I'll just go to user folder and local and Espen under s been if I do, unless I'll see that my rabbit mq bass scripts are located to start our server, I'll say as h rabbit MQ server Simple is that so? I'll hit, enter and our brokers being started and it is complete with six additional plug ins. So to check out if our management plug in is also enabled, I'll open a new tab. And from there I'll say local host and 15672 as the port I'll hit enter And here we go. Our management plugging is also enabled so we can see the management. You I dashboard from here simple as that. So in case you can't see this page, even if you started your broker, all you have to do is type Disk Command and I'll show you now the command for doing this is first, you have to, of course, locate the estate scripts off rabbit and cute binary packages. To do that, you have to go to user folder local and s been in there. You should see rabid MQ scripts and files to enable your plug in for management. You have to type a sage rabbit MQ plug ins and enable management plugging. That's all. In case you don't see this screen, please use this command, and I'll share this command in my description So you can just copy and paste it so that you can enable your management. You I So let's go back to our management. You I on management you I to log in to Roker toe our rabbit MQ server. We have some defaults and toe. Learn those defaults. Let's go back to our installation page and check out our default user access. And as you can see the broker, Kate's a user as guest and with password guest. So let's use those and logon to our rabbit. Mq and guest. Here we go. We have logged into our rabbit and queue server as you can see our dashboard is where comprehensive and detailed. Also useful dashboard. So let's start by discovering what it has and what it's doing for us. First, we have our overview page in this Oreo page. We have the cute messages and the message ratios and the currently idol broker sites. We have the connections listed here. Channels, exchange cues. And if any consumers there, they will be displayed right here, right blow that we have our note, which is provided by Rabbit MQ Server. When we launch it in there, we have the memory usage, number of processes and a disk space that we have on the top. We have the connection step in the connection step. If he had any, we will be seeing the active connections to our broker, either from the consumer or from the publisher. And in the next step, we have channels. The's generals are simply the messaging channels provided by rabid mq, and we'll dig into that in the later sections. In the next step, we have exchanges, and as you can see, as we discussed in our previous lectures, these are the default exchanges from rabid MQ provided to us so that we can work by default in It'll kind of topics and exchanges. As you can see, we have am QP default as the direct type of exchange we have. Am QP direct we have am keep the fan out. We have headers at all the different types of exchange provided for us, and in two Q step, you will be seeing all the cues that we have created for us. But since there are none, for now, we're not seeing anything in it says no queues. And in the admin section, we can manage users ritual hosts, limits and cholesterol mechanisms off rabid MQ. You can simply just create users and, as you can see here at a user and you can define the management type of the user as admin monitoring and other things that we can see here. Also, you can manage policies for queueing and message, broker limits and again clustering. So this is the general look off rabbit, MQ management plugging, and we're going to be making use off it very much in our lectures 6. Creating Queue, Exchange and Binding and Publishing Message: No, it's time that we create our first Q exchange and a binding between them. To do that. I have my rabbit MQ management. You. I open running in front of me. So let's go to exchanges tap first and create an exchange for us. So I'll hit at a new exchange. And as the name, let's say this is a test exchange. And let's just say the type will be tracked and durability as durable by default. So I'm not touching it and auto delete as no internal as no. And there are no organs for now. And just don't worry about the details right now, and I'll just simply hit at exchange to create it. Here we go. We have our exchanges created right here. And, as you can see, it has a section named as bindings, which has none right now, and we can publish messages to this exchange, and we can just believe the exchange altogether. So let's go in. Create a Q right now to bind us to exchange on the queues page I'll hit. Add a new Q and off course. I'm going to say this is a test you and it is of course durable and 40 arguments. I have nothing right now. I'll be using those arguments and making use of them in the later sections when we're implementing our applications. So I'll just hit at Kew. Here we go are curious, ready to get messages from our exchange. So let's go back to all exchanges at from our text exchange. Let's add a binding to the cute that we just created. So I'll just bind this exchange to the Q. Which is test you. And the binding key is not required. So I'm just living it that just as is and I'll just hit mind. Here we go are binding is now this Wait right here, as you can see. So let's go in, publish a message toe our exchange and see if it is being taken by to test you. So I'm not providing any routing t. But I'm just saying hi and hi from rabid MQ course just like that. I'm not adding any other property. I'm just saying in the message body, which is payload in this case, and I'm just going to publish this message. So let's hit publish message And here we go. We have our pope up notification, saying as message published, and let's go to our cue and in our Q. As you can see, we have a total off one message and that one is ready to see that message. Let's click on our test you and into Teske. You, as you can see from the cute message chart right here we have a spike. That spike is generated when we published our message. And as you can see, we have a total of one messages in our Q to get that message to see that message, let's go and click, get messages and all hit get messages And here we go. We can see our messages are published message in Rabbit M Q Q and which waas high from Robert MQ course. Simple as that. And apart from publishing and seeing this message from an exchange with the binding to a que, we have a couple of other alternatives that we can use, we have consumers that we can see if there are any. In our case, there are none right now, and we can see the bindings, which was with the test exchange from the test que, as you can see here and we can also again publish messages toe are cute directly from this interface, and we can move messages around cues and exchanges. And we can also delete the Q entirely. And we can use the purge option for messages inside Cuba, which is just simply deleting all the messages waiting for the consumers to process in the queue. And we can also see the wrong time metrics for our cue, which is a a detail option for tracking your Q and the consumer traffic. So I hope this is a good introduction to management you I and creating our first Q and exchange with a binding and rabid MQ. And I think this is a were useful exercise. I highly encourage you to do the same in your a moment, and I'll be seeing you on the next section. 7. What is Messaging and Why We Need It?: So let's talk about what is messaging and why we actually need it. Messaging is basically a form of communication within each other, from person to person, from application to application from a system to system, basically anything but for the software world, it provides a mechanism for loosely coupled integration, off software or application components, systems and even multiple systems altogether. So now let's talk about what is a message itself. We exchange messages while we talk to each other. So what do we mean by that is in our daily lives, we exchange messages from one person to the other. So let's suppose that you're talking to your spells, your friend or anyone else. You're simply exchanging messages with each other. So you're asking a question. You're trying to learn something, or you're simply giving out some information to your colleague or a friend. This is a simple form off message exchange and again were simply surrounded by different ways off messaging in all of our daily lives, from email messages to instant messages, everything. So a simplest analogy for a message will be like a text message, instant message in our WhatsApp Skype or any under instant messaging application and so on and again for the software world. If you ever use So protocol. Dan, your were familiar with the message header and the body concept, but this is in a different form, so soap messages were exchanged and shared through the envelopes off soap messages. So these envelope would be containing a message to a system or another software than the software system. Receiving the message will take an action regarding the contents off that message. So this was how the soap protocol was working, and it is still used today. So a typical software message contains at least a header and the body. These are the fundamental parts off a sulfur message that we have and that we're going to use. Of course, let's focus more on the software aspect off messaging and how it's used in our applications and systems. Messaging is an essential element for any kind of Sofaer and system. It's the fundamental building block off any system any software, from colonels to CPU memory, from hardware to software. Everything s communicated through messages in a different form in a different shape. But whatever the reason is, it is exchanged through messages the communication is handled in forms off messages. So the software components again need to communicate somehow to do their actual work, to give you a better picture. To understand this, you can think off our applications are so fair or a simple application that you wrote. So in this application, you, of course, have some methods, some functions to do some actual work. For that work methods will call some other methods. So other applications and you might, of course, have some removed methods removed application calls. And you might have http clients and servers and many more. But these forms in the essence off them, exchange messages again because an application, or even simply a method, has to talk to some other methods, some under application in a form and that form is in its essence, is a message. But as you see the flaw here, these are all synchronous forms of messaging. So to give you an example, when you click on a button off a U. Y. Application off some form of you, I you have to get a response from the system you're cooking on that button to do something and off course you're going to have to receive a response from that system. This is highly natural, very natural. But these kind of communication is mostly synchronous, not a synchronous and not loosely coupled and off course. This is not designed around the concept off. Actual messaging and messaging have to be loosely coupled. So again, why do we need message protocols and under things to communicate, since we have functions, methods, other ways of communication already? So now let's look at an example in the software world to give a better understanding. Let's suppose that there is an e commerce site on Black Friday with, like millions of customer orders coming from different countries, different regions and with different shopping carts, just consider that example. And then I suppose, that there is a telecom operator with millions of customer messages to process and so one so these platforms might just crash because off the load of the customers and the message is the transactions off the users that they have to process think about that this is a huge log on their system and suppose that they're just trying to process all these things all that once it's near to impossible because it say were time consuming and resource oriented task. These task has to be processed separately and independently from each other. So what happens when we need to communicate and remaining to exchange loosely, a synchronously and progressively instead of processing all the messages from customers? Are all the orders from customers All it waas. We somehow need to queue these messages, queue these transactions and process them one by one because otherwise that's going to be a very huge load on our systems. To overcome that, advanced messaging protocols are coming to the rescue. These protocols provide us the actual type off a message for communications so you can simply encapsulate any kind of information inside a message with these protocols. It's simple as that, and you're getting advanced messaging structures to flow your messages through the system, such as queues, topics, channels, exchange and much more, depending on the protocol that you're using for your system. So these are the fundamental concepts and understandings off a messaging system and what it means inside these software world. I hope that I gave you a better understanding and a good picture off how we use and why we use messaging in the next video, we're going to talk about the messaging protocols, their benefits, pros and cons and so one, so I'll see you in the next year. 8. Messaging Protocols: Now let's take a look at the messaging protocols in the marketplace. Let's first start by the Mesa Properties the general observations off messaging protocols so messing protocols are designed with messaging in mind. Here is the emphasis on messaging. It's just because the messaging protocols are basically the ways of transferring messages in any form and any kind through the Net Worlds device says over the Internet and simply everywhere. So there are three of them, which are like most widely years because there are basically hundreds of protocols out there that are known are unknown, but three of them are most widely used, and these three protocols are stump, amputee tea and am Q P. So let's get started with stump and what it has to offer. So Stump is basically simple text oriented messaging protocol. It is basically designed for exchanging simple text messages around, and Stone provides an interoperable format so the clients that use stump can communicate with any still message broker to provide easy and widespread messaging interoperability among many languages, platforms and brokers. So what? This basically says that you can simply use Tom anywhere with a proper client implementation. Stump is very simple and easy to implement. It is almost like the http design in mind. Stump does not deal with concepts like cues and topics. It basically uses a sense semantic with a destination string for wearing a message to deliver so you don't have to deal with things like use topics or exchange with other protocols. With stump, you can just simply use the san Semantic for any kind of string. Any kind of data that you want deliver to the other clients so you just use a sand semantic , and then you can just deliver your message to the destination part. However, the receiver can implement their own cues, topics and exchange implementations. So it's all up to you to decide on whatever you want to do with stump. You can either choose to use the basic way descent semantic way with stump, or you can even implement your cues. Topics and exchange. Consumers of messages subscribe to these destinations. So is basically like there's a sending a message to some destination, and that destination is being subscribed by other clients off stump so they can just received a message when it arrives. It is simple. Is that for more information on stump and how it works and how to implement it. You can visit the stump that get top that I oh, wait Page for more information. Next up is m Q. T T M U T t is basically the acronym for message. Cute telemetry Transport M Que tu t is basically designed for machine to machine or Internet of things. Connectivity protocol. That was the main use case for the design of this protocol. Amputee T is highly standardized because it's being developed for, like, years until now, and it is being backed by the industry giants M Futility Pro Eyes a simple pushing, subscribe messaging. So you just push a message and you just subscribe to the end point of that message, and then you can just simply receive the message. Simple is that and Q two ts specifically designed for bristles. Constraint, do I says and low band with high late Insee networks such as dial up lines in satellite links. So what do we mean by that? Is you have a very old, very resource constrained twice that you want to connect to the Internet or just want to send some messages and maybe even receive them so you can use amputee protocol because it's a very low, bandwidth oriented technology so that you can just simply use message exchanges with other devices. With that where all doe eyes of yours, impunity is a full featured enterprise messaging and wear lightweight ideal for mobile and I O. T. So behind its simplicity, you can use any kind of device, mostly for resource concentrate all and low bandwidth with devices. But it has the all the enterprise messaging capabilities, and because it's very lightweight, it is ideal for mobile and Iot t in there. None of things communications. So in q t T is in the back, since it's designed by de industry giants and being developed for years, it supports thousands off concurrent device connections, so you can just plug a factory, plug a whole industry with MPT tea and start communicating instantly. M que Tu t has some compact binary packets, so there are no message properties, no metadata, and all the headers with the message are compressed. That's basically where delight weight comes from. So the famous technologies off AWS, which is I o tee and Green grass, which is the edge computing solution from Amazon are basically designed around mut t because of its simplicity and because it allows both old and new devices to be connected over the empty T t altogether. So let's move on to a M Q. P, which is our protocol that we're going to focus on. MGP is basically advanced message queueing protocol. This is the acronym MTP is highly reliable and interoperable. What do you mean by that? You can just use am Q P in any environment from desktops, too mobile two i o t. Simply everything. Am Q P solutions from different vendors does work, which is where other protocols failed. So let's just think of an example right now. Some X Company develop a solution using and keep e protocol specifications and some under white company developed. Also another implementation off AM keep e. So when we try to communicate, these clients develop using acts and why companies implementations, it just simply works. This is the beauty off am Q. P and just gives you the idea why it's so popular. So it is highly standardized force. This is just the basic idea behind a protocol, of course, and it provides a wide range of features related to messaging it as reliable, queuing, topic based publish and subscribe messaging, which almost under every other protocol has. It has flexible routing transaction and, of course, security. So let's give an example. The J. P. Morgan, the giant financial company, is processing billions of messages a day with AM Keep e The number billions is the key here , and you can even go higher than this. And in the AM keep E section, we're going to discover much more about the AM Q P and the benefits and the architectural behind it, so I'll see you on the next video. 9. What is AMQP and What It Solves?: Now let's talk about the original point of our course, which is am Q p and what it solves. So, as you learned earlier, MPP is an advanced message queueing protocol. It's reliable and interoperable. The solution is coming out of different vendors. It's just simply work where other protocols have failed, it is highly standardized, is providing a wide range of features, and we have lots of use cases. But of course, we all know that, and off course there's much more to it than these with AM keep e. So let's take an example and see where the benefits off am keep he comes from. So let's suppose we want completely different systems to exchange messages. So we have a Wender A with Gela application. Then we have a window. Be with a definite application, and in the middle of those two, we have the Winter Sea with the AM Q P 1.0, broker. So we want to communicate thes two Wenders and we're going to use Wender See, which is the AM Q P broker. To do that? Render A publishes the message from its Joe application to AM Q P broker and then when Derby, with its definite application, receives the message from the ANC yuppie broker in the middle from the lender. See, and as you can see, these are all three different lenders with different capabilities. One is using a Joe application to publish its message and the other one as using a darknet application to receive the message. And in the middle of that, we have a broker, which is distended within the communication channel. So are under a, and render be can communicate flawlessly with the broker in the middle of them. It'll be a gel application, dotnet application or any other application that you can think off with the proper AM Keep e implementation. You can just communicate through different platforms and services with the help of AM keep e simple as that. So for a M Q P side, let's talk a little bit about the other features of it. So am keep. He makes the difficult become practical. As we saw with the previous example, you can just communicate with different platforms and applications and services. You don't have to rely on a single system or single application or single language. You might have a double based implementation talking to other applications, and you don't have to know what the other application is implementing. You just have to care about the message and the content. Thought the message that you're going to deliver All amputee clients Inter operate with all AM keep e servers. This is what was the point off our example in the prove? A slight. So as you can remember, Joe Application was talking to a dominant application behind the scenes. That was with the help of the AM Q P broker. Diverse programming languages can communicate easily. This is the same thing with our example again, legacy message Brokers can be retrofitted to remove proprietor protocols from the networks . So what this means is that when you implement AM keep E, you can just get rid off the legacy protocols from your system because of its advanced technologies. Behind the scenes, MGP allows you to communicate instantly and in a modern fashion so you won't have to depend on does unreliable technologies anymore. You just have to implement your client for the AM QP application and with the AM QP broker in the middle of everything, you can just communicate with any client and Q P is also a were cloth friendly platform and protocol. It enables messaging as a cloud service, so you're simply the lawyer your am keep e broker into the cloud, and then you can just simply start publishing and subscribing to those messages that you send and again. Publish and subscribe is one of the key features off AM Keep E with the advanced features off publishing subscribe AM Keep E. You can simply use it as a publish and subscribe client, but with ofcourse advanced features with an keep E. You can define your messaging exchange as transactions with transaction messaging you can define Fail over, and we'll try mechanisms for your messages. But that's not all. Of course. With the transactional way of messaging, you can provide a much more reliable way of communication. So let's talk about some of the use cases for AM QP. Do you want a real time feed off constantly updating information? That's no problem for am keep E. Do you want an encrypted assured transaction, which is highly safe and highly secured? Then there is no issue with it for am keep E so you want your messages to be delivered when the destination becomes online, but not the other way around. No problem. You want to send an enormous message while still receiving status updates over the same network connection? There's no problem with an QP. Do you want things to work on all popular operating systems and languages, just like we saw with our example? There is no problem for that. With am keep e and keep e basically solves the technical part off connecting diverse applications and systems altogether. So you don't have to worry about the technical underlying Zoff. The message delivery and transactions all that is left for you to do is to focus on high rally work of reacting to those information flows coming out of your brokers and applications. So these are the key aspects and key takeaways from AM keep e. We're off course, going to see lots of things in action with the implementation off Rabbit Team Q. Over AM, keep e 10. Meet RabbitMQ: No, it's time to meet rabid MQ itself. Let's start by the top of the line, features off rabbit MQ and build on top of it with the architectural appearance off the system itself, Robert M. Que is a powerful open source message broker and also known as a message oriented middleware. The point of having a open source message broker is that is being real by the community itself. It is by far the most popular implementation off AM Q P. When you check out the jobless things and the online blocks for message queue, implementations and questions and answers in blocks, you'll see that Rabbit MQ is theme most popular implementation, and by far you can find most of the examples off implementation ways Off things in the message. Queuing Ways. Rapid MQ provides a robust and flexible messaging platform designed to inter operate with under messaging systems so you can plug and play under a M. Q. P Providers using rabbit in Q. This is one of the most powerful features off rabbit named Q. And as we saw with our previous examples, you can simply pluck different kinds of applications different language of applications with rabbit MQ with its broker Rapid MQ is the wallop using air lag programming language so it belts on its high throughput and low latency. Er Lang, if you don't know is a were were a powerful language and rabbit. MQ message. Broker technology is built around it, So having the AM Q P as the underlying technology and being built by R. Lang Rabbit MQ is a very powerful message. Broker Robert M. Que also supports clustering for full tolerance and scale bility. So in case that you think a single Robert MQ broker is not good for your business, then you can simply cluster different Robert MQ brokers and have a highly available and highly scalable system for your message processing. It's a very common use case when dealing with messaging systems and especially what Rabbit named Q. It is almost a Miss Practice rabbit MQ and with the help of its AM Q P protocol defines exchange cues and bindings between them. So these are the fundamental concepts all rabbit and Q and the Q mechanism behind it. We're, of course, going to talk much more about these technologies and the architectures behind these. So just hold on for a moment. Robert M. Que allows multiple connection channels inside a just a single TCP connection in order to remove the overhead of opening a large number of TCP connections to the message broker. This is a huge advantage, considering other message cream protocols by using a single TCP connection. You're not going hard on your network bandwidth, and you're delegating the management off message processing to Rabbit and Q. And you're not thinking about the overhead. No, let's take a look at the rub. It MQ from an architectural standpoint, so we off course have publishers to publish messages to our messaging Q or Rabbit named Q. In our case, the's publishers are simply publishing their messages to some exchange it or beat a default exchange or some other exchange that day defined. They just publish their messages inside it. There are default or your own defiant exchange in rabbit named Q. And just don't worry about it. We're going to get there. And after that, of course, we have subscribers that are listening for those messages either with a specific topic or a specific keyword there, just listening, and maybe they're just not listening for some specific words, they might be listening through everything. So in that case, they receive those messages from the cues off the message broker off or Robert M. Que. The message is coming to the exchanges are being delivered to cues. Why, using some kind of bindings, these bindings are to define ER's off exchange and Q connections. For example, you define your exchange and bind it to some que using a binding. You can even bind in exchange to multiple cues and make your messages transfer to multiple cues and being listened by multiple subscribers, even for publishers, exchange are the starting point, and their messages are being published to exchange. And for the subscriber part, they only care about the queues. The queues are the most important part for them. They listen to queues, and they listen to the messages from publishers published to exchange. And then with the binding. They received the messages from the Q itself. They don't know about the exchange. They just know about the Q because of the architecture of the rabid mq. So this is a basic diagram off what's going on when you try to use rabbit name Q or the general look general overview of all things going on inside the MQ and from the publisher site and from the subscriber site Roof Course going to the Deep Into Rabbit named Q and publishers and subscribers in our applications. But for the starting point, these arty, fundamental actors in rabbit MQ world that you should know about. 11. 4 Actors of Messaging with RabbitMQ: So we are about to discover the pillars are the building blocks off rabbit Mq. And these are exchanges, accused topics and bindings. These are the foundational concepts in regard of rabid MQ or any am keep e. But for rabbit MQ. These are very important concepts. So I'd like you to pay a were careful attention to this lecture. And if you need to please go back and watch it again. So let's start with four actors of messaging with rabid MQ in rabid MQ. We off course have a message. Producer. This producer produces some form of message and this message is being sent to an exchange. This exchange can be a default exchange or a custom exchange that you created after that from the exchange, the message is routed. Disrupting mechanism can be defined by you or by rabid mq as the default. With this relative defined, your message is being delivered to a que this que is where the messages are piled up to be sent to the consumers. So when it reaches the queue, it is being delivered to a consumer. This consumer is waiting there expecting the message. This can be a that net application, some Gela application or a simple command line application can be simply anything. So it is receiving the message at the end. This life cycle off messages with Rabbit MQ using producer a message and exchange a routing A Q And the consumer is like an infinite life cycle. All these processes and stages are refined it and re plate whenever you send whenever you tried to deliver a message. So let's just focus on foundational concepts that we see here, and these are producers exchange routings, cues and consumers. 12. Exchanges: so let's start with exchanges. Exchanges are basically the actual AM Q P elements where messages are sent. At first, Justin's resold with the previous picture. They take a message and route it into one or more accuse, and this is a key concept. You can just send a message to an exchange, and from that exchange, your message can be routed to a either single que are multiple cues and this is a We're a great feature of rabbit. MQ and routing algorithm decides where to send messages from exchange destroying algorithm is built into rabid mq and when you provide the configuration off your exchange to rob two messages to the cues that you were interested in, those messages are properly delivered to accuse that you one of dissent. Simple is that and these rotting algorithms depends on the exchange type and rules called as bindings. These bindings are of the actual configurations that I was just talking about. When you configure your bindings for exchanges to cues, you tie them somehow and when you want to send a message, your messages first getting to the exchange and after the exchange, your message is being delivered to a Q. Using the binding configuration. This is where the tying glue this is, where the action going on with being the exchange and the Q bindings are simply used to bind exchanges to cues for message delivery. This is the key concept. Just as I was talking with the previous bowl points here, bindings are the glues to halt exchanges and queues altogether to deliver your messages to the consumers. There are simply four exchange types, and first up is direct exchange. Direct exchange is simply an empty string or am q p dot direct direction for any exchange. This is basically the default exchange that I was talking about in our previous lives in previous lectures. This is where the messages are delivered than you say, No binding or no configuration to your exchangeable que. After that, we have fennel of exchange into default. It is defined as am q p dot fan out. As the name suggests, fan out exchanges are being used as the message distribution to everywhere. For all the bindings that your exchange has, your messages are being spread out to all the cues with your bindings. This is simply a final exchange, a topic exchanges being defined as am keep e dot topic as default. And of course, you can choose the topic that you want to send the topic. Exchange a key point in the topic exchanges. You define a topic, and you send your message using that topic. Let's suppose you're running a e commerce site and your customer just purchased an item from your store, and you want to notify some other part of your system about this customer purchase and you have a topic named as customer purchased. And when you send your message with the topic exchange with this topic. Your message is being delivered to the concerning party's over your messaging system, so topic exchanges simply like the specific way of delivering messages in and keep e. Finally, we have headers. Exchange headers, exchange are basically the way to exchange headers with messages in AM QP and off course with rabbit MQ. You exchange messages, and you want to just maybe exchange or headers with other messages and under accusing exchanges or maybe other consumers. This is the way to exchange messages for headers in rabid MQ. And for the default, you can use a M Q p dot match or AM keep. He ducked headers and some specific or custom header that you want to provide 13. Queues: Next up, we have queues. Queues are a core element in any MQ protocol, but especially for rabid MQ. It is the foundational element in rabbit in Q messages are out it to cues from exchanges. Just as we talked earlier about this, Messages are being routed to cues from exchanges using the bindings. Queues are simply like final destinations and rabid mq before being received by subscribers . This is a very key point here because you're consumer only knows about the cues they don't know about the exchange or anything else. They configure their client you regarding this cute configuration, and then they received their messages from the queues. Routing algorithms depends on the exchange type and rules called findings, just as we saw with the exchange example and exchange definitions, Bindings are very important in Rabbit named Q. You have to properly mind your exchanges and Q's so that your consumers can receive messages properly. Bindings are again simply used to bind exchanges to cues for message delivery. I'm pointing this out again and again just because you need to learn this because this is a very important concept. In rabid MQ bindings are being done from exchanges through cues. So there are a couple of properties of a que and let's start one by one off course accused . Going to have a name, the name of the queue that you defined when you can define simply anything for your cue as the name and there is the durability and the variable for that is called US durable, Durable stakes. Rabbit in Cute, that issued eater Persist your cute to the desk or not. So this is another important concept in Rabbit named Q. You can have durable queues for later message delivery. This is about, like retry mechanisms and fail over mechanisms. This is an important concept, and we're definitely going to get there in our following lectures. Just don't worry about it right now, but you should know that you can have durable kills in your exchange. And there's a property as exclusive. Exclusive simply defines that. If there are no items in the Q and A think you can simply be deleted by the system by the rabbit. MQ. This is the flak for it, and there is also a flag s auto dash delete, and this flag indicates rabbit MQ debt. Think you can be deleted when there are no consumer subscriptions. So simply if there are no consumers subscribe to your cue. Daniel. Cute can be on a deleted by rabid MQ itself the broker itself. 14. Topics: and next up we have topics. Topics are simply the subject. Part of the messages, the having all the Q topics are defined as rotting key for message grouping. So with that route and he defined, you can deliver your messages to proper cues and proper consumers for routing key configuration. There's a special formatting, such as At that looks, that error is a way off defining a topic so you define your configuration as apt outlooks. That error and you indicate that your topic is about application error. Logging Simple is that off course? They're optional parameters for message exchange. So while you're defining your topic, you can have some optional parameters injected to your topic and cure definition. And we're definitely going to see that in the following lectures, you consent and resume messages without any topic information. So this is again the default exchange In default topic. You can simply send a message without indicating anything, and your message is being delivered to default Extension Rabbit in Q. On with that default exchange than your messages being blinded to default you that with that default. Que if for consumers listening to that, your consumer then can receive the message. Simple as that topic extends are defined using topics for message delivery. So this is the key concept from the default messaging. You have to define a topic to use a topic exchange. Otherwise, there is no point in defining a topic exchange. 15. Bindings: next up, we have the bindings, one of the key concepts in rabbit and Q. So we have exchange and between the Q and the extent we have a binding bindings are rules that exchanges used to route messages to cues. We stated that again and again, and here I am saying that again, because this is a very important concept to instruct an exchange named E to route messages to a que called K. So thats cake. You has to be bound to you the exchange e. Otherwise, your messages are not going to be delivered to this. Q. And your consumer will not receive the message. So this is a problem. You have to be using this, pointing to mind your exchange to your cue. Bindings may have an optional row drinky attribute used by some exchange types, so this is the topic exchange. We have to provide a topic to have an optional argument, and with that optional argument with that topic, our exchange can bind yourself to a specific que so the road and key acts like a filter, right? So let's take an example as the binding enology. So think of the Q is like your destination in Istanbul City off Turkey and exchanges like the Ataturk Airport in Istanbul City. So bindings are routes from a tattered airport to your destination. There can be like zero are much more ways to reach it, right? So I hope you're here with me. In this analogy again, Q is like a destination in Istanbul in Turkey, and the exchanges like Ataturk Airport in Istanbul and the bindings are like the routes from Ataturk, the airport to your destination. So simply there can be, like zero are much more ways to reach it. Simple is that this is a very important example, and I hope you think about this again and again to grasp all the points in this. And finally, if messages cannot be routed to any Q so simply there are no bindings for that exchange. It was published, too, so it is either dropped or return to the publisher, depending on the message attributes the publisher has set. So using proper and correct publishing arguments with their message, Your consumer will not be mistaken because with that way your messages are being bounced back to you. If they are not delivered to the consumer so this is a great way to communicate with consumers and under clients over your messaging system. You have to be very careful about configuring rabbit MQ. Because otherwise your messages might get lost in the system and they will not be delivered to your consumers Off course. We're going to see lots of examples configuring rabbit, MQ accused bindings, exchange and everything. So just don't worry about right now, and I'll see you in the next video, where we're going to talk about a rabid MQ and under MQ solutions as based on the AM Q P. 16. RabbitMQ vs Other MQs: before we start with our implementations was rabid him que let's take a closer look at under M cues and compared to the performance and under factors of rabid mq. So in here we have a table off like the most popular and queues out there. And let's start with comparison off features one by one. Considering rabbit, MQ has a broker at the centre at the heart, we have a no here but in the case of zero mq or Iran mq and then Apache Kafka. They either use some distributed way of message brokers or maybe cloud based message brokers Completely different architectures considering rabbit. Mq So we have a brokering rabbit. Mq. So we have a centralized way of communication in the case of clients. As you can see, almost all the M queues have some clients for C C plus plus C, Sharp Joe and some other languages that you can define your cues, exchange topics and everything and communicate with your mq on the transaction perspective . Off course Rabbit MTU is supporting that. But in the case of zero mq IRA name Q and Apache Kafka. We cannot simply do that. But for Apache Kafka off course, you can have an implementation with an external plug in on the persistence, perspective and reliability you can configure your rabbit MQ, such as with the durable argument that we see with the Q and configuration. And, of course, you can configure Rabbit MQ extensively. Other than durable argument to be a persistence and reliable and Q in act, Um que? Who can also configure that but withdrew him cute. You have no persistence on the routing perspective, as we saw with the topic exchanges and under routing configurations, you can easily implement routing in Rabbit in Q. But in the case of irony, MQ and off course Apache que Pit, you don't have this option. We cannot use routing because they simply use pops up kind of messaging. And this is the architectural decision off them so they don't have this option on the FEI lower and higher availability perspective. Robert M. Que, of course, is winning here again. And in that case, the zero mq is the Onley missing part. It doesn't have the proper mechanisms for fail over and high availability. And as you see with the most left part for our table with the rabid MQ properties. You see that Robbie name? Q has white range of features, and it supports things like fail over high availability, routing, persistence, transaction and lots of different clients. By far, Robert M Que is the best choice in this table. But of course, it really depends on your task. It really depends on your work that you want to achieve, because some things can be much more suitable for Apache, Kafka or zero MQ or active? MQ maybe, but Rabbit MQ in general has more than enough features that you can use an implement and satisfy your customers, clients and everything.