All Products
Search
Document Center

ApsaraMQ for RocketMQ:Set up the Go SDK for ApsaraMQ for RocketMQ

Last Updated:Mar 11, 2026

Install the ApsaraMQ for RocketMQ Go SDK and prepare your development environment to send and receive messages.

Prerequisites

Before you begin, make sure that you have an ApsaraMQ for RocketMQ 5.x instance with the following resources created in the ApsaraMQ for RocketMQ console:

ResourceDescription
Instance endpointThe access URL for your RocketMQ instance
TopicThe message destination
Consumer groupThe logical grouping of consumers that subscribe to the topic

To create these resources, see Step 2: Create resources.

Install the SDK

Run the following command to install the SDK:

go get -u github.com/apache/rocketmq-clients/golang/v5