How to have the DeviceProfile in messages


Today we save messages from MQTT directly in our database.
We have different kinds of devices and so with different decoders needed.
We would like to know how to add the field “device-profile” in the messages ? We imagine we could use the API but for fast filtering it could be easier for us to have this field in the message.

How can we add specific fields (stats or device profile information) in the messages.