eclipse / paho.mqtt-sn.embedded-c

Paho C MQTT-SN gateway and libraries for embedded systems. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
315 stars 178 forks source link

Remove ClientID from pre-defined topic configuration #132

Closed m-cheney closed 6 years ago

m-cheney commented 6 years ago

In the current implementation of pre-defined topics (#117) a person must provide a clientId for each pre-defined topic. Unfortunately we can't provide all current and future clientIDs - this would result in a huge config file with thousands of lines which would have to be updated every time a new client is connected to the network (involving a gateway restart). This mandatory field renders the gateway useless for our use-case.

The implementation should be able to handle pre-defined topics without providing a specific clientId. Each pre-defined topic is valid for all clients.

I would like to refer to the proposal from gualtrapa (Ticket #115 on of the comments). Here he quotes a config file from the emq-sn implementation:

## The pre-defined topic name corresponding to the pre-defined topic id of N.
## Note that the pre-defined topic id of 0 is reserved.
mqtt.sn.predefined.topic.0 = reserved
mqtt.sn.predefined.topic.1 = /predefined/topic/name/hello
mqtt.sn.predefined.topic.2 = /predefined/topic/name/nice

Here no clientId is need.

We would love to see this fixed.

FuzzyPones commented 6 years ago

Or a wildcard option would be helpful too (regex maybe?)

ty4tw commented 6 years ago