IncomingMessageTopicAlias Property
An integer used to identify the topic instead of the full topic filter in order to reduce the size of the publish packet.
Syntax
mqtt.getIncomingMessageTopicAlias(index, [callback])
Default Value
0
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for the getIncomingMessageTopicAlias([callback]) method is defined as:
function(err, data){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'data' is the value returned by the method.
The callback for the setIncomingMessageTopicAlias([callback]) method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
An integer used to identify the topic instead of the full topic filter in order to reduce the size of the publish packet.
If a non-zero topic alias is received, the client should establish a new topic alias mapping or use an existing mapping, depending on whether the IncomingMessageTopic string is empty.
For details on setting topic aliases for outgoing messages, see the TopicAlias configuration setting.
Valid only for MQTT 5.
The index parameter specifies the index of the item in the array. The size of the array is controlled by the IncomingMessageCount property.
This property is read-only and not available at design time.
Data Type
Integer