DEV Community

Asanka Boteju
Asanka Boteju

Posted on

What is AmazonMQ, How you can Setup and Connect to a RabbitMQ Instance via the Browser.

What is Amazon MQ Service?

AmazonMQ is a fully managed open source messaging service for Apache ActiveMQ and RabbitMQ that makes it easy to setup, operate messaging in the cloud. With AmazonMQ you can migrate your on-prem workloads created in ApacheMQ and ActiveMQ as is, without any code rewrites.

Amazon MQ uses industry-standard APIs and protocols such as JMS, NMS, AMQP, MQTT, STOMP, OpenWire, and WebSocket for messaging. It handles administrative activities such as broker configuration, software updates, and failure detection and recovery.

A Few Use Cases for AmazonMQ

  • Low-latency event messaging: Ensure low latency for thousands of events, so that applications have the most recent information possible.

  • Migrate with flexible configurations: Migrate from on premises to Amazon MQ with active/standby, a network of brokers, or cluster configurations.

  • Invoke AWS Lambda functions: Integrate applications and use Lambda functions to poll the Amazon MQ message broker.

Amazon MQ Features

  • Managed Service: With Amazon MQ you can use the AWS Management Console, AWS CloudFormation, the Command Line Interface (CLI), or simple API calls to launch a production-ready message broker in minutes. Amazon MQ manages administrative tasks such as hardware provisioning, broker setup, software upgrades, and failure detection and recovery.

  • Security: Amazon MQ provides encryption of your messages at rest and in transit. It’s easy to ensure that your messages are securely stored in an encrypted format. Connections to the broker use SSL, and access can be restricted to a private endpoint within your Amazon VPC, which allows you to isolate your broker in your own virtual network.

  • Monitoring: Amazon MQ is integrated with Amazon CloudWatch and AWS CloudTrail. With CloudWatch you can monitor metrics on your brokers, queues, and topics. For example, you can monitor the depth of your queues and generate alarms if messages aren’t getting through. Using CloudTrail, you can log, continuously monitor, and retain Amazon MQ API calls.

  • Broker Instance Types: Amazon MQ currently supports seven broker instance types: mq.t2.micro, mq.t3.micro, mq.m4.large, mq.m5.large, mq.m5.xlarge, mq.m5.2xlarge, and mq.m5.4xlarge, which provide various combinations of CPU, memory, and network performance.

  • Amazon MQ is integrated with AWS IAM: Identity and Access Management or IAM provides you the ability to control the actions that your IAM users and groups can take on specific Amazon MQ brokers. Authentication from applications to the broker itself is provided using username and password-based authentication, and optionally using LDAP for ActiveMQ brokers.

Amazon MQ also supports both single instance brokers, suitable for evaluation and testing, and replicated highly available cluster deployment modes for production workloads.

How to Setup a Amazon MQ Instance

  • Log into the AWS Console and Search for Amazon MQ.

  • From the Amazon MQ page, Click on Get Started button.
    Image description

  • Next you need to select the Broker Engine Type. In there select RabbitMQ as we are going to create a RabbitMQ broker as part of the exercise.

Image description

  • Next, specify a user name and a password which you will need to login to the RabbitMQ instance once it is been setup in the AWS Cloud.

Image description

  • Then, specify a name for the Broker and select the Broker instance size from the drop down menu.

Image description

  • Set the Broker Engine version and Leave the other settings as is as shown below. If you want to be able to connect to the broker from a specific VPC. Then that option is also available.

Since this is a demo, we will allow public access option.

Image description

Image description

Image description

Image description

Image description

  • Then review the configurations and click create to create the broker. Typically, Broker creation would take around 15 - 20 minutes.

Image description

  • Now, your broker has been created successfully as reflected in the status.

Image description

  • Click the Broker entry from the table and scroll down to view the settings (ARN and other details).

  • Click on the RabbitMQ Web Console URL and click to open the RabbitMQ Management Dashboard.

Image description

  • Use the credential specified in step #4 above to login to the RabbitMQ dashboard.

Image description

  • Awesome! 🙌 You are logged into the RabbitMQ Management Console. Now you can now setup channels, exchanges, queues, topics and start send/receive messages via the broker.

Image description

Thank you for stopping for a moment to read the article! 😊

Top comments (0)