edit-icon download-icon

Java SDK preparation

Last Updated: Oct 16, 2018

Before executing the Java code described in this section, please prepare the environment according to the following instructions.

  1. Dependency can be introduced through either one of the following two methods:

    • Introduce dependency using Maven:

      1. <dependency>
      2. <groupId>com.aliyun.openservices</groupId>
      3. <artifactId>ons-client</artifactId>
      4. <version>"XXX"</version>
      5. //version number of the latest Java SDK
      6. </dependency>

      About the version number of the latest Java SDK, see Release notes.

    • Download a dependency JAR package:

      About the download link of the latest Java SDK, see Release notes.

  2. The topic, producer ID, and consumer ID involved in the code need to be created first in the MQ console.

  3. Applications using MQ services through TCP need to be deployed on ECS instances in the same region.

Message tag can be completely customized by the application. For detailed creation process, see Step 2: Create resources in Quick start guide.

Thank you! We've received your feedback.