Updated on 2023-11-15 GMT+08:00

Overview

This guide describes how to collect the information required for connecting to a RabbitMQ instance, such as the instance connection address, port, username, and password. It also provides connection examples in Python, and Spring Boot.

RabbitMQ instances are compatible with the open-source RabbitMQ protocol. To access and use a RabbitMQ instance in languages other than Python, see the tutorials at https://www.rabbitmq.com/getstarted.html.

Open Source SDKs

DMS for RabbitMQ supports all SDK open-source versions, Table 1 lists common ones.

Table 1 Open source SDKs

Language

SDK

Java

rabbitmq-java-client

Spring Framework

SpringAMQP

.Net

rabbitmq-dotnet-client

Python

pika

PHP

php-amqplib

C

rabbitmq-c

Go

amqp091-go

The latest release of the SDKs is recommended.

Client Network Environment

A client can access a RabbitMQ instance in any of the following modes:

  1. Within a Virtual Private Network (VPC)

    If the client runs on an Elastic Cloud Server (ECS) and is in the same region and VPC as the RabbitMQ instance, the client can access the instance using an IP address within a subnet in the VPC.

  2. Using a VPC peering connection

    If the client runs on an ECS and is in the same region but not the same VPC as the RabbitMQ instance, the client can access the instance using an IP address within a subnet in the VPC of the RabbitMQ instance after a VPC peering connection has been established.

    For details, see VPC Peering Connection.

  3. Over public networks

    If the client is not in the same network environment or region as the RabbitMQ instance, the client can access the instance using its public network IP address.

The three modes differ only in the connection address used by the client to access the instance. This document takes intra-VPC access as an example to describe how to set up the development environment.

If the connection times out or fails, check the network connectivity. You can use Telnet to check connectivity of the connection address and port number of the instance.