Hi everyone, I would like to know if there is a way to change published packets payload received by mosca MQTT broker. I'm using published event to get all published packets and by using inspect I have noticed that the packet is published at the end of this method so maybe there could be a way to do this.
In my case this would be useful because I have to save an incoming object in MongoDB and add the id of the created object to the packet.payload. ATM I'm using two differents topics like /objectName and /objectName/store and once I receive a packet in /store I create the new object and publish the created object data with id in /objectName.
Hi everyone, I would like to know if there is a way to change published packets payload received by mosca MQTT broker. I'm using
published
event to get all published packets and by using inspect I have noticed that the packet is published at the end of this method so maybe there could be a way to do this.In my case this would be useful because I have to save an incoming object in MongoDB and add the id of the created object to the
packet.payload
. ATM I'm using two differents topics like/objectName
and/objectName/store
and once I receive a packet in/store
I create the new object and publish the created object data with id in/objectName
.