vertx.setTimer(5000, l -> client.unsubscribe(MQTT_TOPIC)); });
/** * Unsubscribe from receiving messages on given topic * @param topic Topic you want to unsubscribe from * @return current MQTT client instance */ public io.vertx.rxjava.mqtt.MqttClient unsubscribe(String topic) { delegate.unsubscribe(topic); return this; }
log.info("subscribing complete for message id = " + suback.messageId() + " with QoS " + suback.grantedQoSLevels()); client.unsubscribe(MQTT_TOPIC, ar2 -> { assertTrue(ar2.succeeded()); messageId = ar2.result();
/** * Unsubscribe from receiving messages on given topic * @param topic Topic you want to unsubscribe from * @param unsubscribeSentHandler handler called after UNSUBSCRIBE packet sent * @return current MQTT client instance */ public io.vertx.rxjava.mqtt.MqttClient unsubscribe(String topic, Handler<AsyncResult<Integer>> unsubscribeSentHandler) { delegate.unsubscribe(topic, unsubscribeSentHandler); return this; }
log.info("subscribing complete for message id = " + suback.messageId() + " with QoS " + suback.grantedQoSLevels()); client.unsubscribe(MQTT_TOPIC, ar2 -> { assertTrue(ar2.succeeded()); messageId = ar2.result();
/** * Unsubscribe from receiving messages on given topic * @param topic Topic you want to unsubscribe from * @return current MQTT client instance */ public io.vertx.rxjava.mqtt.MqttClient unsubscribe(String topic) { delegate.unsubscribe(topic); return this; }
/** * Unsubscribe from receiving messages on given topic * @param topic Topic you want to unsubscribe from * @param unsubscribeSentHandler handler called after UNSUBSCRIBE packet sent * @return current MQTT client instance */ public io.vertx.rxjava.mqtt.MqttClient unsubscribe(String topic, Handler<AsyncResult<Integer>> unsubscribeSentHandler) { delegate.unsubscribe(topic, unsubscribeSentHandler); return this; }
log.info("Subscriber " + subscriber1.clientId() + " subscribed to " + MQTT_TOPIC); subscriber1.unsubscribe(MQTT_TOPIC, ar2 -> {
log.info("Subscriber " + subscriber1.clientId() + " subscribed to " + MQTT_TOPIC); subscriber1.unsubscribe(MQTT_TOPIC, ar2 -> {