Use the community edition SDK for Java over TCP to connect to ApsaraMQ for RocketMQ and send and receive messages.
Usage notes
Use the community edition SDK only if you migrate open source RocketMQ to the cloud and do not want to modify your code. For all other scenarios, use the commercial edition SDK provided by ApsaraMQ for RocketMQ. The commercial edition SDK provides more features and greater stability than the community edition SDK. For more information, see SDK for Java (Commercial Edition).
Version guide
The community edition SDK for Java over TCP requires version 4.5.2 or later. We recommend that you use the latest version. Download the SDK from Community edition TCP SDK for Java.
Preparations
Complete the following steps in order:
-
Import Maven dependencies.
-
Create resources in the ApsaraMQ for RocketMQ console.
For more information, see Preparations.
(Optional) Parameter description
Configure the required parameters before you use the community edition SDK for Java over TCP to send and receive messages. For more information, see Parameter description.
Parameter descriptions are also available in the SDK source code comments.