absmach / magistrala

Industrial IoT Messaging and Device Management Platform
https://www.abstractmachines.fr/magistrala.html
Apache License 2.0
2.48k stars 674 forks source link

Use metadata field to pass protocol-specific info in RawMessage #401

Closed drasko closed 5 years ago

drasko commented 6 years ago

Some protocols have specific meta-information. For example - "last will and testament" type of message for MQTT.

In order for this information to be shared over NATS, Metadata map needs to be added in Mainflux message structure: https://github.com/mainflux/mainflux/blob/master/message.proto

drasko commented 5 years ago

@nmarcetic @anovakovic01 @dusanb94 @srados do you agree that we use this Metadata field to pass some info that is related to message itself, so we can pass info related to one protocol to another (i.e. for example to know if this message is "Last Will & Testament" message in MQTT protocol)?

Do we need this field, esepcially that this is not set by authors of the message, but by adapters - which means that authors of the platform (us) will need to decide what goes into this Metadata.

If this issue is not needed - let's close it.

anovakovic01 commented 5 years ago

I don't see the need for this. I think that if we add any more fields without any real need and use cases we will create really complicated system that will be much harder to maintain. I suggest that we close this for now and if the is a need for this in the future we can add it.

drasko commented 5 years ago

Closing then. We can reopen if needed.