endpoint.subscribeAcknowledge(subscribe.messageId(), grantedQosLevels);
/** * @return Message identifier */ public int messageId() { if (cached_0 != null) { return cached_0; } int ret = delegate.messageId(); cached_0 = ret; return ret; }
/** * @return Message identifier */ public int messageId() { if (cached_0 != null) { return cached_0; } int ret = delegate.messageId(); cached_0 = ret; return ret; }
/** * @return Message identifier */ public int messageId() { if (cached_0 != null) { return cached_0; } int ret = delegate.messageId(); cached_0 = ret; return ret; }
/** * Used for calling the subscribe handler when the remote MQTT client subscribes to topics * * @param msg message with subscribe information */ void handleSubscribe(io.vertx.mqtt.messages.MqttSubscribeMessage msg) { synchronized (this.conn) { if (this.subscribeHandler != null) { this.subscribeHandler.handle(msg); } // with auto ack enabled, the requested QoS levels are granted if (this.isSubscriptionAutoAck) { this.subscribeAcknowledge(msg.messageId(), msg.topicSubscriptions() .stream() .map(MqttTopicSubscription::qualityOfService) .collect(Collectors.toList())); } } }
/** * Used for calling the subscribe handler when the remote MQTT client subscribes to topics * * @param msg message with subscribe information */ void handleSubscribe(io.vertx.mqtt.messages.MqttSubscribeMessage msg) { synchronized (this.conn) { if (this.subscribeHandler != null) { this.subscribeHandler.handle(msg); } // with auto ack enabled, the requested QoS levels are granted if (this.isSubscriptionAutoAck) { this.subscribeAcknowledge(msg.messageId(), msg.topicSubscriptions() .stream() .map(MqttTopicSubscription::qualityOfService) .collect(Collectors.toList())); } } }
/** * Used for calling the subscribe handler when the remote MQTT client subscribes to topics * * @param msg message with subscribe information */ void handleSubscribe(io.vertx.mqtt.messages.MqttSubscribeMessage msg) { synchronized (this.conn) { if (this.subscribeHandler != null) { this.subscribeHandler.handle(msg); } // with auto ack enabled, the requested QoS levels are granted if (this.isSubscriptionAutoAck) { this.subscribeAcknowledge(msg.messageId(), msg.topicSubscriptions() .stream() .map(MqttTopicSubscription::qualityOfService) .collect(Collectors.toList())); } } }
final int messageId = subscribe.messageId(); LOG.info("SUBSCRIBE [{}] from MQTT client {}", messageId, this.mqttEndpoint.clientIdentifier());
endpoint.subscribeAcknowledge(subscribeMsg.messageId(), grantedQosLevels);
@Override protected void endpointHandler(MqttEndpoint endpoint, TestContext context) { endpoint.subscribeHandler(subscribe -> { List<MqttQoS> qos = new ArrayList<>(); MqttQoS grantedQos = subscribe.topicSubscriptions().get(0).topicName().equals(MQTT_TOPIC_FAILURE) ? MqttQoS.FAILURE : subscribe.topicSubscriptions().get(0).qualityOfService(); qos.add(grantedQos); endpoint.subscribeAcknowledge(subscribe.messageId(), qos); this.async.complete(); }); endpoint.accept(false); } }
@Override protected void endpointHandler(MqttEndpoint endpoint, TestContext context) { endpoint.subscribeHandler(subscribe -> { List<MqttQoS> qos = new ArrayList<>(); MqttQoS grantedQos = subscribe.topicSubscriptions().get(0).topicName().equals(MQTT_TOPIC_FAILURE) ? MqttQoS.FAILURE : subscribe.topicSubscriptions().get(0).qualityOfService(); qos.add(grantedQos); endpoint.subscribeAcknowledge(subscribe.messageId(), qos); this.async.complete(); }); endpoint.accept(false); } }
endpoint.subscribeAcknowledge(subscribeMsg.messageId(), grantedQosLevels);
@Override protected void endpointHandler(MqttEndpoint endpoint, TestContext context) { endpoint.subscribeHandler(subscribe -> { List<MqttQoS> qos = new ArrayList<>(); qos.add(subscribe.topicSubscriptions().get(0).qualityOfService()); endpoint.subscribeAcknowledge(subscribe.messageId(), qos); this.subscribeAsync.complete(); }).unsubscribeHandler(unsubscribe -> { endpoint.unsubscribeAcknowledge(unsubscribe.messageId()); this.unsubscribeAsync.complete(); }); endpoint.accept(false); } }
@Override protected void endpointHandler(MqttEndpoint endpoint, TestContext context) { endpoint.subscribeHandler(subscribe -> { List<MqttQoS> qos = new ArrayList<>(); qos.add(subscribe.topicSubscriptions().get(0).qualityOfService()); endpoint.subscribeAcknowledge(subscribe.messageId(), qos); this.subscribeAsync.complete(); }).unsubscribeHandler(unsubscribe -> { endpoint.unsubscribeAcknowledge(unsubscribe.messageId()); this.unsubscribeAsync.complete(); }); endpoint.accept(false); } }
endpoint.subscribeAcknowledge(subscribe.messageId(), subscribe.topicSubscriptions() .stream()
endpoint.subscribeAcknowledge(subscribe.messageId(), subscribe.topicSubscriptions() .stream()