code: public MqttAsyncClient connectBroker() {
          LOG.info(String.format("mqtt=======客户端%s与rabbitMQ server: %s 准备建立连接,userName = %s", getMqttClientId(), JSON.toJSONString(serverURIs), userName));
          try {
              sampleClient = new MqttAsyncClient("tcp://overriddenByMqttConnectOptions.setServerURIs:1883", getMqttClientId(), persistence);
              connOpts = new MqttConnectOptions();
              connOpts.setAutomaticReconnect(true);
              connOpts.setServerURIs(serverURIs);
              connOpts.setUserName(userName);
              connOpts.setPassword(getPwd());
              connOpts.setCleanSession(cleanSession);
              connOpts.setMaxInflight(1000 /**默认的值是10,对于我们来说这个值太小!*/);
              connOpts.setKeepAliveInterval(keepAliveInterval);
              sampleClient.setCallback(getCallback(this));
              sampleClient.connect(connOpts).waitForCompletion(60 * 1000);
              LOG.info(String.format("mqtt=======客户端%s与rabbitMQ server: %s 建立连接完成,userName = %s", getMqttClientId(), JSON.toJSONString(serverURIs), userName));
              return sampleClient;
          } catch (MqttException me) {
              throw new RuntimeException(String.format("mqtt=======客户端%s与rabbitMQ server: %s 连接失败!!! userName = %s", getMqttClientId(), JSON.toJSONString(serverURIs), userName), me);
          }
      }
docs: 连接mqtt server,并返回一个客户端对象,如果连接失败,那么返回null