Connection based on open source JAVA MQTT Client Ali cloud IoT

Outline

When using cloud Ali officially IoT JAVA Device SDK and cloud testing, found that the log will always print subscription and release some inexplicable Topic of the message, but the user does not operate the Topic, this is because the underlying default SDK has done a lot of system Topic Subscribe and publish settings, and can not be shut down, resulting in many tests can not meet the expected test expectations. If you do not want the default number system Topic subscription and publication, it is recommended to use open source MQTT Client Topic subscribe and publish messages.

Steps

1, create products and equipment

Reference: Ali cloud platform Qucik Start of things to create products and equipment parts.

2, pom.xml

   <dependencies>
        <dependency>
            <groupId>org.eclipse.paho</groupId>
      

Guess you like

Origin yq.aliyun.com/articles/719051