use of io.netty.handler.codec.mqtt.MqttSubscribePayload in project rocketmq-externals by apache.
the class MqttSubscribeMessageHandlerTest method getMqttSubscribeMessage.
private MqttSubscribeMessage getMqttSubscribeMessage() {
MqttFixedHeader fixedHeader = new MqttFixedHeader(MqttMessageType.SUBSCRIBE, false, MqttQoS.AT_MOST_ONCE, false, 0);
MqttMessageIdVariableHeader variableHeader = MqttMessageIdVariableHeader.from(1);
List<MqttTopicSubscription> subscriptions = new ArrayList<>();
subscriptions.add(new MqttTopicSubscription("topic1", MqttQoS.AT_MOST_ONCE));
subscriptions.add(new MqttTopicSubscription("topic2", MqttQoS.AT_LEAST_ONCE));
MqttSubscribePayload payload = new MqttSubscribePayload(subscriptions);
return new MqttSubscribeMessage(fixedHeader, variableHeader, payload);
}
use of io.netty.handler.codec.mqtt.MqttSubscribePayload in project rocketmq-externals by apache.
the class ConsumeMessageIntegrationTest method getMqttSubscribeMessage.
private MqttSubscribeMessage getMqttSubscribeMessage() {
MqttFixedHeader fixedHeader = new MqttFixedHeader(MqttMessageType.SUBSCRIBE, false, MqttQoS.AT_MOST_ONCE, false, 0);
MqttMessageIdVariableHeader variableHeader = MqttMessageIdVariableHeader.from(subscribePacketId);
MqttSubscribePayload payload = new MqttSubscribePayload(subscriptions);
return new MqttSubscribeMessage(fixedHeader, variableHeader, payload);
}
use of io.netty.handler.codec.mqtt.MqttSubscribePayload in project rocketmq-externals by apache.
the class PubSubIntegrationTest method getMqttSubscribeMessage.
private MqttSubscribeMessage getMqttSubscribeMessage() {
MqttFixedHeader fixedHeader = new MqttFixedHeader(MqttMessageType.SUBSCRIBE, false, MqttQoS.AT_MOST_ONCE, false, 0);
MqttMessageIdVariableHeader variableHeader = MqttMessageIdVariableHeader.from(consumerSubscribeId);
MqttSubscribePayload payload = new MqttSubscribePayload(topicSubscriptions);
return new MqttSubscribeMessage(fixedHeader, variableHeader, payload);
}
Aggregations