BroadbandForum / obuspa

OB-USP-AGENT is a system daemon providing a User Services Platform (USP) Agent. https://github.com/BroadbandForum/obuspa/wiki
BSD 3-Clause "New" or "Revised" License
93 stars 62 forks source link

MQTT headers in log #52

Closed italktothewind closed 2 years ago

italktothewind commented 2 years ago

Hi,

Is there any way to log the MQTT message properties present in a received PUBLISH message?

Thanks!

italktothewind commented 2 years ago

My question arose when reading this in the documentation: "R-MQTT.27 - USP Endpoints sending a USP Record using MQTT 5.0 MUST have “usp.msg” in the Content Type property" (https://www.broadband-forum.org/download/TR-369.pdf)

Now I'm testing how to send that in MQTT headers.

italktothewind commented 2 years ago

FYI these MQTT properties can be logged in Mosquitto: https://stackoverflow.com/questions/72538385/how-to-see-message-mqtt-properties-when-using-mosquitto-sub-command

holme-r commented 2 years ago

OBUSPA implements R-MQTT.27, but it does not appear that libmosquitto provides this level of detail to the LogCallback() function in mqtt.c. The mosquitto sub command must have application code that iterates over all of the properties and logs them. OBUSPA does not do this. For your testing, I'd use the mosquitto sub command or wireshark.