This topic describes how to prepare the environment before you use the Message Queue for 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 more information about the SDK versions, see Recommended versions.
  2. Obtain the resources.
    You must create resources that are used in the code of the SDK for Java in the console in advance, including the instance endpoint, topic name, and group ID. For more information, see 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.