Before you use Message Queue for Apache RocketMQ SDK for Java to send and subscribe to messages, perform the steps that are described in this topic to prepare the environment.

Prerequisites

Install Message Queue for Apache RocketMQ SDK for Java

Introduce a dependency by using Maven and add the following dependency to the pom.xml file:
<dependency>
    <groupId>com.aliyun.mq</groupId>
    <artifactId>mq-http-sdk</artifactId>
    <!--Replace the following version number with the latest version number of Message Queue for Apache RocketMQ SDK for Java-->
    <version>1.0.3.2</version> 
    <classifier>jar-with-dependencies</classifier>
</dependency>
Note For more information about the versions of Message Queue for Apache RocketMQ SDK for Java, see Release notes.