Hi, everyone, and welcome back.
Now, in today's video, we are going to discuss about Amazon MQ.
Now, before we go ahead and look into the advantages that MQ provides, let's look into our current
stage of learning.
Based on what we know, we'll go ahead and discuss further.
Now, one of the services that we know is SCS.
Now SCS stands for Simple queuing Service.
So at an overview it does provide great set of functionality, but when we compare it with various other
message brokers, the set of functionalities are still limited.
Now, in the industry there are various message broker services that are available, which are very
popular.
For example, you have Apache active MQ and it provides a great set of features and these set of message
brokers are used extensively in the on premise set of organizations.
Now, one of the challenges that organizations generally face when they migrate to cloud, for example,
let's say an organization is actively using the active service as the message broker for that application
and they want to move to cloud.
Now in cloud you have excuse, now excuse and active MQ.
If there is a migration that needs to take place, then the application code will also need to be rewritten.
And this is something that organizations want to avoid at the initial stage.
So if you're using messaging with existing application and want to move the messaging to the cloud quickly
and easily, then you can consider the Amazon.
MQ For example, this can be seen in the diagram where you have the Amazon MQ service, which is the
message broker, and it allows us to create the active MQ or rabbit MQ message broker.
Behind the scenes.
It will go ahead and create a set of easy to instance, it can be single, easy to or in a multi easy
environment, and that easy to instance will have these message brokers configured and then you will
be able to connect your application to the appropriate message brokers.
So let's do one thing.
Let's go ahead and quickly look into it from a demo perspective.
Now for today's video in the Amazon MQ, I already have the broker configured and if you look into the
broker engineer, it is based on the Apache active MQ.
Now if you look into the deployment mode, it is a single instance broker and the instance type here
is based on TX three dot Micro.
So let's quickly open this up and within here you will generally see the URL through which you can connect
to the active MQ web console.
So let's go ahead and quickly open this up.
At this stage, you can go ahead and quickly manage the broker.
Now, if you look into the active MK, it consists of features that are in combination with the features
that you will see in SNS.
For example, you have the queues, you have the topics here, you have the subscribers and so on.
So let's go to the queues and in fact you can go ahead and create a queue.
Also, let me just again note that this is just a demo video where we just want to understand the basics
of the MK service.
Now in the queue, let's quickly create a queue so our queue is created.
Now in the queue you see there are no messages in case if you would like to send a message, let's also
try it out within your I'll Say Hello world.
And there are a lot of configuration options that you can add over here in the message.
We'll keep it simple and we'll go ahead and send the message.
Now at this stage you see a number of pending messages.
One, if I'll quickly open the queue here, you will see the message ID if I open this up, you will
see the Hello world.
All right.
So I hope at a high level overview, you understood what AMCU is trying to achieve now in case if you
know the basics of US sense understanding the basics of active NQ will be much more simpler.
Now before we conclude a few important pointers to note.
First one is that in case if you are building a brand new applications in the cloud, then I recommend
that you make use of the SDKs and SNS instead of the MQ.
Second is that Amazon asks an inside lightweight, fully managed message queue service and topic services
that can scale almost infinitely and provide simple, easy to use APIs.
Now, when we discuss about Amazon MQ, it does not scale infinitely.
You will have to specify the instance type.
You will have to specify various other configurations and based on that, the maximum number of messages
will be supported.
But it can happen that things are slowing down at the MQ level as well.
So this is the reason why it is recommended to use the managed services where you do not really have
to worry about the scaling, high availability and other such issues.
Now also note that whenever you go ahead and create MQ, there are multiple set of options available.
You can create a single instance, you can create an instance based on active and standby and so on.
Now generally for high availability, active standby mode is one of the recommended ones and this can
also be seen in the diagram where in one of the availability zone two A you have the active MQ broker
and in Ruby you have the standby MQ broker and both of them are connected to a shared FS volume where
the data is written to in case of the active broker goes down, client can go ahead and connect to the
standby broker and this is how the high availability is maintained.
Now let me also quickly show you on where exactly you can see this.
For example, whenever you create an MQ, you will generally see the broker engine.
You have the active MQ and rabbit MQ.
Let's select active MQ.
You're now within, you get the deployment mode, you have a single instance broker, you also have
an active standby broker.
As we're discussing, single instance is launched in a single availability zone.
If that AC goes down, then your MQ is also down.
And this is the reason why in the production environment you have to select the active standby broker,
which is the recommended one.
Along with that, you also get to select what is the instance type associated with your broker.
In case if you select a lower instance type, then it might not be able to support a lot of messages
and things will slow down.
And this is the reason why, as we are discussing, that it is not infinitely scalable when compared
to the SCS and SAS.
All right.
So I hope with this you understood the basics of MQ and with this will conclude today's video.