endpoint.publishAcknowledgeHandler(messageId -> {
/** * Set the puback handler on the MQTT endpoint. This handler is called when a PUBACK * message is received by the remote MQTT client * @param handler the handler * @return a reference to this, so the API can be used fluently */ public io.vertx.rxjava.mqtt.MqttEndpoint publishAcknowledgeHandler(Handler<Integer> handler) { delegate.publishAcknowledgeHandler(handler); return this; }
/** * Set the puback handler on the MQTT endpoint. This handler is called when a PUBACK * message is received by the remote MQTT client * @param handler the handler * @return a reference to this, so the API can be used fluently */ public MqttEndpoint publishAcknowledgeHandler(Handler<Integer> handler) { delegate.publishAcknowledgeHandler(handler); return this; }
/** * Set the puback handler on the MQTT endpoint. This handler is called when a PUBACK * message is received by the remote MQTT client * @param handler the handler * @return a reference to this, so the API can be used fluently */ public io.vertx.rxjava.mqtt.MqttEndpoint publishAcknowledgeHandler(Handler<Integer> handler) { delegate.publishAcknowledgeHandler(handler); return this; }
/** * Setup handlers for MQTT endpoint */ private void setupMqttEndpoint() { this.mqttEndpoint .publishHandler(this::publishHandler) .publishAcknowledgeHandler(this::pubackHandler) .publishReleaseHandler(this::pubrelHandler) .publishReceivedHandler(this::pubrecHandler) .publishCompletionHandler(this::pubcompHandler) .subscribeHandler(this::subscribeHandler) .unsubscribeHandler(this::unsubscribeHandler) .disconnectHandler(this::disconnectHandler) .closeHandler(this::closeHandler); }
private Future<Device> registerHandlers(final MqttEndpoint endpoint, final Device authenticatedDevice) { final CommandHandler<T> cmdHandler = new CommandHandler<>(vertx, getConfig()); endpoint.closeHandler(v -> close(endpoint, authenticatedDevice, cmdHandler)); endpoint.publishHandler( message -> handlePublishedMessage(MqttContext.fromPublishPacket(message, endpoint, authenticatedDevice))); endpoint.publishAcknowledgeHandler(msgId -> cmdHandler.handlePubAck(msgId, afterCommandPubAckedConsumer)); endpoint.subscribeHandler(subscribeMsg -> onSubscribe(endpoint, authenticatedDevice, subscribeMsg, cmdHandler)); endpoint.unsubscribeHandler(unsubscribeMsg -> onUnsubscribe(endpoint, authenticatedDevice, unsubscribeMsg, cmdHandler)); if (authenticatedDevice == null) { metrics.incrementUnauthenticatedConnections(); } else { metrics.incrementConnections(authenticatedDevice.getTenantId()); } return Future.succeededFuture(authenticatedDevice); }
this.async.complete(); }); }).publishAcknowledgeHandler(messageId -> {
this.async.complete(); }); }).publishAcknowledgeHandler(messageId -> {