Closed benaish closed 1 year ago
@benaish I agree that each message should contain Category. I'm looking at how to handle the MQTT Json to contain Category but the regular Json (sent over Http) to not contain Category since it is part of a full Response Document as opposed to MQTT that only sends the Entity.
My approach will most likely be to use an Options list (KeyValuePair) to pass a flag to the JsonEntityFormatter.Format(IEnumerable
I should have this added in a new release over the weekend.
Let me know if you have any further thoughts on how to handle this or if you have any other questions.
Thanks, -Patrick
I just published the new 5.4.0 Release that contains this fix as well as some other additions to the MQTT implementation. More information can be found Here.
Let me know if this is what you were looking for.
Thanks, -Patrick
have a similar Options list for other methods in the EntityFormatter class. UPDATE: Works as expected
That's great, I will look into it!
Thanks, Moshe
I'm using the Flat topic mode due to level limitation in AWS IoT Core. By doing that I'm losing important information that i would like to get as part of each message - Category (Event/Sample/..). It would be great to keep getting this information also on the flat topic mode. Another option could be to get this as part of the payload - but currently the Json formatter skips the Category when creating the payload out of the observation:
return CreateMessage(topic, Formatters.EntityFormatter.Format(documentFormatterId, observation));
Related to a discussion in issue #42