How to set up MQTT-SN topic ids in RSMB
my question is about configuring RSMB using MQTT topic names and MQTT-SN object IDs over an MQTT-SN gateway.
Using "Getting Started with a Real Small Message Broker" is very useful for figuring out how to set up name mapping when two true small message browsers are connected.
Regarding the MQTT-SN v1.2 specification under "6.10 Gateway Publishing Procedure", the gateway (in my case the gateway is enabled in RSMB using the broker_mqtts implementation) can send a REGISTER message to inform the client of the topic name and its assigned topic ID value ... Now I would like to customize the mapping of MQTT topic names to predefined MQTT-SN topic IDs.
Can the mapping be configured in the RSMB broker.cfg configuration to tell the MQTT-SN client a predefined topic ID after a successful RSMB connection?
source to share
I faced the same issue with RSMB. Then I decided to deploy the original Git project to Github and add this feature myself. It's available at https://github.com/MichalFoksa/rsmb . The function is described in Getting started .
It supports:
-
Dynamic predefined theme name, where place-holder [ClientId] is replaced with the replaced actual value of the client id. For example, a message posted by the client under the name "Sensorduino", sent to the specified topic name
sensor/[ClientId]/meter
will be published on the topic:sensor/ Sensorduino/meter
. -
Client configuration. This is the name of the subject to identify the Id specific to a specific client.
Hope it helps and it's not too late.
Michal
source to share