[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [hono-dev] Property bag at the end of topics for MQTT adapter?
|
On Mon, 2017-02-13 at 15:24 +0000, Pellmann Marc (INST/ECS4) wrote:
> Hi
>
> > > to be able to support setting of specific content types (and other
> > > properties
> > > in the future) over the MQTT adapter I suggest to support properties in URL
> > > format at the end of the topics. Microsoft uses the same on Azure - https:/
> > > /doc
> > > s.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support.
> > >
> > > Topic would be something like
> > >
> > > telemetry/DEFAULT_TENANT/4711/?$content-
> > > type=application%2Fjson%3B%20charset%3Dutf-8
> >
> > Is it necessary to URL encode the properties? IMHO the topic name in MQTT is
> > UTF-
> > 8 encoded and should therefore not require encoding, or does it?
>
> At least we need to encode the slash and also the question mark, so it will be
> much more easy to use URL encoding in general, I think.
>
> Without encoding in the topic-structure would look like:
>
> telemetry/DEFAULT_TENANT/4711/?$content-type=application/json; charset=utf-8
>
We should probably declare a delimiter between the endpoint address and the
message properties. Similar to e.g. how it is done in URIs ...
Since we are in control of the endpoint addresses we can make sure that the
delimiter is not a part of the address. In this case we could define "?" as the
delimiter. Is there also a delimiter for the properties themselves? In URIs the
"&" character is used for that purpose. Does the "$" have a particular meaning in
your example?
> So you can not differentiate between a topic part and part from the value of
> the content-type. Also in other properties in the future there might be
> question marks etc.
>
> Mit freundlichen Grüßen / Best regards
> Marc Pellmann
>
> Bosch Software Innovations GmbH
> Core Products Development (INST/ECS4)
> Schöneberger Ufer 89-91
> 10785 Berlin, Germany
> www.bosch-si.de
>
> Registered office: Berlin, Register court: Amtsgericht Charlottenburg, HRB
> 148411 B
> Executives: Dr.-Ing. Rainer Kallenbach, Michael Hahn
>
> _______________________________________________
> hono-dev mailing list
> hono-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/hono-dev