If you want to use Simple Message Queue (formerly MNS) to send and receive messages, you can use SMQ SDK for Java. This topic describes how to install SMQ SDK for Java.
Environment requirements
Java Development Kit (JDK) 1.6.0 or later is installed. For more information, see Java Downloads.
You can run the java -version command to check the Java version.
Maven 2.5 or later is installed. For more information, see Downloading Apache Maven 3.9.8.
Install the Java dependency
Select a version of SMQ SDK for Java based on your business requirements. We recommend that you use the latest version of SMQ SDK for Java.
For more information about the versions of SMQ SDK for Java, see Versions.
<dependency>
<groupId>com.aliyun.mns</groupId>
<artifactId>aliyun-sdk-mns</artifactId>
<version >${ Latest version of MNS SDK for Java}</version>
</dependency>
Add JAXB dependency
If you use the non-module system such as Classpath, you do not need to add the Java Architecture for XML Binding (JAXB) dependency.
If you use the module system, make sure that Java 9 or later is installed, and add the following requires declarations to your module-info.java file.
module your.module.name { requires java.xml; // Declare the dependency on the standard XML module. requires aliyun.sdk.mns; // Declare the dependency on the SMQ SDK module. // Declare the dependencies on other modules. }