UserProperties property
Gets or sets the user properties of the will message. Read/write. Variant.
Syntax
msg
.UserProperties
where
msg
- is an MQTTWillMessage object.
TIP:
This property's data type is Variant, however, it can only be assigned an array of the MQTTUserProperty object.
Example
Dim userProp(2) As MQTTUserProperty Dim up1 As MQTTUserProperty Dim up2 As MQTTUserProperty Set up1 = mqtt.CreateUserProperty() up1.Name = "Key 1" up1.Value = "Value 1" Set userProp(1) = up1 Set up2 = mqtt.CreateUserProperty() up2.Name = "Key 2" up2.Value = "Value 2" Set userProp(2) = up2 msg.UserProperties = userProp
Provide Feedback