class

MQTT::V5::Subscribe

Inherits MQTT::Header / BinData / Reference / Object

MQTT-3.8

Constants

AFTER_DESERIALIZE = [] of Nil

MQTT-3.8

ALLOWED_PROPERTIES = [PropertyId::SubscriptionIdentifier, PropertyId::UserProperty]
BEFORE_SERIALIZE = [] of Nil

MQTT-3.8

ENDIAN = ["big"]

MQTT-3.8

KLASS_NAME = [MQTT::V5::Subscribe]

MQTT-3.8

PARTS = [{type: "basic", name: message_id, cls: UInt16, onlyif: nil, verify: nil, value: nil, endian: nil}, {type: "basic", name: properties, cls: MQTT::V5::Properties, onlyif: nil, verify: nil, value: nil}, {type: "variable_array", name: topics, cls: MQTT::V5::SubTopic, container: Array(MQTT::V5::SubTopic), onlyif: nil, verify: nil, read_next: -> do consumed < packet_length end, value: nil}] of Nil

MQTT-3.8

REMAINING = [] of Nil

MQTT-3.8

Class methods

bit_fields

MQTT-3.8

Source

Instance methods

__format__

A group or bit_field captures the endianness at its declaration point, so declaring endian after one would silently leave it system-endian. Fail loudly.

Source
add_user_property(key : String, value : String) : Nil
Source
calculate_length
Source
message_id
message_id=(message_id : UInt16)
properties
properties=(properties : Properties)
subscription_identifier

Tags every message delivered by this subscription, so a client can route by identifier instead of re-matching the filter

Source
subscription_identifier=(value : UInt32 | Nil)
Source
topic_hash
Source
topics
topics=(topics : Array(MQTT::V5::SubTopic))
topics=(hash : Enumerable(Tuple(String, QoS)))
Source
topics=(array : Enumerable(String))
Source
user_properties
Source
validate!
Source