Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This is a step-by-step guide on how to set up a RabbitMQ broker in Amazon MQ service.

However, you can also choose to set up and manage the RabbitMQ broker on your own server.

Detailed information about Amazon MQ service can be found in the official AWS documentation.

The configuration of a RabbitMQ broker consists of 2 steps:

  1. Broker creation

  2. Broker configuration

We will mark the credentials required for Nwave Cloud by bold text.

Broker creation

  1. Find service “Amazon MQ” using the search panel

  2. Click on the “Get started” button

  3. Select “Rabbit MQ” engine and click “Next”

  4. For simplicity choose the single-instance broker. If you wish to set up a more reliable cluster deployment please refer to the official documentation.

  5. Configure the settings. Please save your username and password as it will be required for broker configuration and integration.

Brocker name

guide-broker

broker identifier in the Amazon MQ service

Brocker instance type

mq.t3.micro

You can select the smallest instance for now

Larger instances will be required for over 100,000 devices

Username

guide_user

Password

<your password>


Fill out the form and click ”Next”:

  1. You can review your broker configuration on the last screen. Click on “Create broker” to finalize the creation procedure.

  2. Now you see the list of brokers. Wait until the new broker status will change to “Running“.

The broker creation is complete. Now you can proceed to the next step.

Broker configuration

The broker configuration step explains how to configure RabbitMQ Queue, RabbitMQ Exchange and bind the queue to the exchange.

  1. Go to Amazon MQ → Brockers page

  2. Click on the broker name which was created in the previous step.

  3. In the Connections section, you can find the Endpoint URL. You will need this URL to configure the integration Nwave.

  4. You have to click on Link called “RabbitMQ web console” to continue broker configuration

  5. In the opened Tab you must enter Username and Password which you used for the broker registration on the previous step

  6. Now you have to register a new Virtual Host. Go to “Admin Page”, select “Virtual Hosts” menu on the right and click on expanding form “Add a new virtual host”

  7. Give a name to your new virtual host and click on the button “Add virtual host”

  8. Now you can see the create virtual host in the table

  9. Now you have to create a new exchange. Go to the menu “Exchanges” and click on the expanding form “Add a new exchange”

  10. Fill the exchange registration form. You should select the created on previous step virtual host and give a name to a new exchange. The exchange name is needed for intgration with Nwave Cloud. Fill all other options as on the screenshot:

    Click on the button “Add exchange” to finish the exchange registration.

  11. Now you have to create a new Queue. Go to the menu “Queues” and click on expanding form “Add a new queue”

  12. Fill the form. You should select previously create Virtual Host and give a name to your queue. Remember the queue name. It is needed for Nwave Cloud integration.

    Click on the button “Add queue” to finish.

  13. Now click on the Queue name in the table

  14. Open the form “Bindings”

  15. Fill in the previously registered exchange name and queue name

    Finally, press the button “Bind”.

Integration credentials

Here is the list of all credentials than you need to proceed integration with Nwave Cloud:

  • Broker URL

  • Username

  • Password

  • Virtual Host

  • Exchange name

  • Queue name

Now you can proceed to the integration with Nwave Cloud.

Integration with Nwave Cloud

  1. Go to the main menu

  2. Go to the RabbitMQ → Endpoints page

  3. Click on the (plus) button at the bottom right

  4. Fill out the “New endpoint” form:

    • Name - user-defined

    • Host - the endpoint URL excluding “amqps://” prefix

    • Port - 5671

    • VHost - your virtual hostname

    • Exchange - your exchange name

    • Exchange is durable - yes, because this option was selected during the exchange registration

    • Exchange type - Direct, because this option was selected during the exchange registration

    • Queue - your queue name

    • Login - your broker’s username

    • Password/Repeat password - your broker’s password

      Click on the “Add” button.
      Warning: Before going further by the guide you should notice Nwave about the registration of a new AWS RabbitMQ Endpoint. Current Nwave Console version requires a manual action to make the endpoint operable.

  5. Now you should see the created Endpoint in the Endpoints table:

  6. Go to the Routes menu to continue the integration

  7. Click on the (plus) button in the bottom right

  8. Fill the form. Select Zone for sending data to RabbitMQ, your previously created Endpoint and message type. Toggle Active option if you want to start sending data after the route is created:

    Press the button “Add” to finish the route registration.

Integration testing

To test the integration you should wait until your sensor sends at least one message. The sensor should be positioned in the zone, which was selected during the route registration. All messages sent to your RabbitMQ broker are displayed on the RabbitMQ → History page:

Also, you can check if your RabbitMQ broker is receiving messages. Go to the RabbitMQ broker administration page, find your queue on the Queues page and click on the name of your queue. You should see message processing statistics:

  • No labels