How to configure MQTT-SN topic IDs in RSMB

2019-07-05 14:04发布

my question is regarding the configuration of the RSMB using MQTT topic names and MQTT-SN topic ids over a MQTT-SN gateway.

Using the "Getting started with the Really Small Message Broker" information is very useful to figure out how to configure topic name mapping in the case of connecting two Really Small Message Brokers together.

Regarding to the MQTT-SN specification v1.2 in section "6.10 Gateway's Publish Procedure", the gateway (in my case a gateway included in the RSMB, using the broker_mqtts implementation) may send a REGISTER message to inform the client about the topic name and its assigned topic ID value. Now, I would like to configure the mapping of MQTT topic names to pre-defined MQTT-SN topic IDs.

Is it possible to configure a mapping in the RSMB broker.cfg configuration to tell a MQTT-SN client the pre-defined topic ID after a successful connection to the RSMB?

标签: mqtt
3条回答
狗以群分
2楼-- · 2019-07-05 14:31

A more advanced fork of @michal-foksa RSMB supports predefined topic in a config file.

https://github.com/tonnenpinguin/rsmb

查看更多
爷、活的狠高调
3楼-- · 2019-07-05 14:34

I was facing same problem with RSMB. Then I decided to fork original Git project on Github and add this feature myself. It is available on https://github.com/MichalFoksa/rsmb. Feature is documented in Getting started.

It supports:

  1. Dynamic pre-defined topic name, where place-holder [ClientId] is replace by replaced by actual value of client Id. For example a message published by a client called "Sensorduino" sent to a pre-defined topic name sensor/[ClientId]/meter will be published on topic: sensor/ Sensorduino/meter.

  2. Client specific configuration. It is topic name to topic Id mapping specific only for a particular client.

Hope it helps and it is not too late.

Michal

查看更多
倾城 Initia
4楼-- · 2019-07-05 14:45

Unfortunately no. RSMB does not support predefined topics at the moment. However you can register topics from client side. Or you can subscribe on real topics.

I found RSMB nowhere near production ready. You can experiment with it, but it has a LOT of bugs.

查看更多
登录 后发表回答