All Products
Search
Document Center

ApsaraMQ for RocketMQ:Environment preparation

Last Updated:Oct 28, 2024

This topic describes how to prepare the environment before you use the Apache RocketMQ SDK for Java to send and receive messages.

Procedure

  1. Install the SDK dependency library.

    Import dependencies by using Maven or download the JAR package. For information about the SDK versions, see Recommended versions.

  2. Obtain the resources.

    You must create the resources, including the instance endpoint, topic, and consumer group, that are used in the code of the SDK in the ApsaraMQ for RocketMQ console in advance. For more information, see Step 2: Create resources.

  3. Download the demo project, modify the parameters for the SDK for Java based on the resources obtained in Step 2, and then run the sample code.

    Note

    If your SDK is rocketmq-client, you can develop applications without the need to download the demo project. For more information, see Sample code.