eclipse / paho.mqtt.java

Eclipse Paho Java MQTT client library. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
2.12k stars 883 forks source link

In pahov5 the properties should be attached to the MqttMessage object #459

Closed borgendale closed 6 years ago

borgendale commented 6 years ago

Please fill out the form below before submitting, thank you!

If this is a bug regarding the Android Service, please raise the bug here instead: https://github.com/eclipse/paho.mqtt.android/issues/new

The MQTT properties associated with a Message should be attached to the MqttMessage object, rather than being specified on the publish() method. It is somewhat arbitrary what attributes of the message are properties and which are not. It is really just whether they existed before MQTTv5.

At the current level (as of 20171208) the message properties are not attached to the message, and are not passed on the messageArrived() callback. Thus they are not available when the message is received.

jpwsutton commented 6 years ago

This has been implemented and the MqttMessage Object now has the MqttProperties Object within it as well as a getProperties() and setProperties(MqttProperties) functions.