package com.demo.mqtt;
import com.ibm.mqtt.MqttClient;
import com.ibm.mqtt.MqttException;
import com.ibm.mqtt.MqttSimpleCallback;
public class ClientSub {
private final static boolean CLEAN_START = true;
private final static short KEEP_ALIVE = 30;// 低耗网络,但是又需要及时获取数据,心跳30s
private final static String CLIENT_ID = "clientSub";
/**
* @param args
* @throws MqttException
*/
public static void main(String[] args) throws MqttException {
MqttClient mqttClient1 = new MqttClient(&#
import com.ibm.mqtt.MqttClient;
import com.ibm.mqtt.MqttException;
import com.ibm.mqtt.MqttSimpleCallback;
public class ClientSub {
private final static boolean CLEAN_START = true;
private final static short KEEP_ALIVE = 30;// 低耗网络,但是又需要及时获取数据,心跳30s
private final static String CLIENT_ID = "clientSub";
/**
* @param args
* @throws MqttException
*/
public static void main(String[] args) throws MqttException {
MqttClient mqttClient1 = new MqttClient(&#