public static void main(String[] args){

        try {
            client = new MqttClient("tcp://localhost:1883", "mqttClienttest");
            client.connect();
            MqttMessage message = new MqttMessage();
            message.setPayload("A single message".getBytes());
            client.publish("pahodemo/test", message);
            Thread.sleep(900000);
            client.disconnect();
        } catch (MqttException e) {
            e.printStackTrace();
        }catch (InterruptedException e1){
            e1.printStackTrace();
        }

    }