All Products
Search
Document Center

ApsaraMQ for RabbitMQ:SDKs and sample code

Last Updated:Mar 10, 2026

ApsaraMQ for RabbitMQ uses the AMQP 0-9-1 protocol and is compatible with open source RabbitMQ client libraries. Which SDK you use depends on how you authenticate:

  • Alibaba Cloud account or RAM user -- Use any open source RabbitMQ SDK. Generate a username and password in the ApsaraMQ for RabbitMQ console, then connect with the standard client library for your language.

  • RAM role (cross-account authorization) -- Use an ApsaraMQ for RabbitMQ SDK. These SDKs add a signature dependency to the open source client for authentication. The messaging API stays the same.

Open source RabbitMQ SDKs

These client libraries work with any language or framework that supports AMQP 0-9-1.

Language or framework

SDK

Java

RabbitMQ Java Client Library

Spring Framework

Spring AMQP project for Java

.NET

.NET SDK

Python

Python SDK

PHP

PHP SDK

Rust

Rust SDK

C and C++

C and C++ SDK

Go

Go SDK

JavaScript and Node

JavaScript and Node SDK

Objective-C and Swift

Objective-C and Swift SDK

For additional languages, see Client Libraries and Developer Tools on the RabbitMQ website.

ApsaraMQ for RabbitMQ SDKs

Use these SDKs when you authenticate with a RAM role for cross-account authorization. Each SDK adds a signature dependency to handle RAM role authentication. The messaging API is the same as the open source client.

Language or framework

SDK and sample code

Java

amqp-java-demo

Spring

amqp-springboot-demo, amqp-spring-demo, amqp-springcloud-stream-demo, amqp-springcloudbus-demo

Python

amqp-python-demo, amqp-python-celery-demo

Go

amqp-go-demo

.NET

amqp-dotnet-demo

C++

amqp-cpp-demo

Node.js

amqp-node-demo

PHP

amqp-php-demo

Ruby

amqp-ruby-demo