diff --git a/chirpstack/configuration/region_as923.toml b/chirpstack/configuration/region_as923.toml index fdca08de..59c012cd 100644 --- a/chirpstack/configuration/region_as923.toml +++ b/chirpstack/configuration/region_as923.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="as923" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_as923_2.toml b/chirpstack/configuration/region_as923_2.toml index a44be2d5..2d179234 100644 --- a/chirpstack/configuration/region_as923_2.toml +++ b/chirpstack/configuration/region_as923_2.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="as923_2" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_as923_3.toml b/chirpstack/configuration/region_as923_3.toml index e28cfa13..bb9b1a32 100644 --- a/chirpstack/configuration/region_as923_3.toml +++ b/chirpstack/configuration/region_as923_3.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="as923_3" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_as923_4.toml b/chirpstack/configuration/region_as923_4.toml index 5f9d2f54..05e4a928 100644 --- a/chirpstack/configuration/region_as923_4.toml +++ b/chirpstack/configuration/region_as923_4.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="as923_4" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_au915_0.toml b/chirpstack/configuration/region_au915_0.toml index c847c0e1..fcb28560 100644 --- a/chirpstack/configuration/region_au915_0.toml +++ b/chirpstack/configuration/region_au915_0.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="au915_0" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_au915_1.toml b/chirpstack/configuration/region_au915_1.toml index 64249950..1d3ab6c8 100644 --- a/chirpstack/configuration/region_au915_1.toml +++ b/chirpstack/configuration/region_au915_1.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="au915_1" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_au915_2.toml b/chirpstack/configuration/region_au915_2.toml index 1b128421..7cb2249c 100644 --- a/chirpstack/configuration/region_au915_2.toml +++ b/chirpstack/configuration/region_au915_2.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="au915_2" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_au915_3.toml b/chirpstack/configuration/region_au915_3.toml index 5c69cd77..c2c44dc5 100644 --- a/chirpstack/configuration/region_au915_3.toml +++ b/chirpstack/configuration/region_au915_3.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="au915_3" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_au915_4.toml b/chirpstack/configuration/region_au915_4.toml index afe6be9b..61f40c9a 100644 --- a/chirpstack/configuration/region_au915_4.toml +++ b/chirpstack/configuration/region_au915_4.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="au915_4" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_au915_5.toml b/chirpstack/configuration/region_au915_5.toml index 0425c925..7b552139 100644 --- a/chirpstack/configuration/region_au915_5.toml +++ b/chirpstack/configuration/region_au915_5.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="au915_5" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_au915_6.toml b/chirpstack/configuration/region_au915_6.toml index 0d7b96cd..2d9bf3a9 100644 --- a/chirpstack/configuration/region_au915_6.toml +++ b/chirpstack/configuration/region_au915_6.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="au915_6" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_au915_7.toml b/chirpstack/configuration/region_au915_7.toml index ac713399..914b8c20 100644 --- a/chirpstack/configuration/region_au915_7.toml +++ b/chirpstack/configuration/region_au915_7.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="au915_7" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_cn470_0.toml b/chirpstack/configuration/region_cn470_0.toml index f1822c19..a60d53dd 100644 --- a/chirpstack/configuration/region_cn470_0.toml +++ b/chirpstack/configuration/region_cn470_0.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="cn470_0" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_cn470_1.toml b/chirpstack/configuration/region_cn470_1.toml index dbfa6b24..a6bcfa95 100644 --- a/chirpstack/configuration/region_cn470_1.toml +++ b/chirpstack/configuration/region_cn470_1.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="cn470_1" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_cn470_10.toml b/chirpstack/configuration/region_cn470_10.toml index 9407bc6a..a0c8fb82 100644 --- a/chirpstack/configuration/region_cn470_10.toml +++ b/chirpstack/configuration/region_cn470_10.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="cn470_10" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_cn470_11.toml b/chirpstack/configuration/region_cn470_11.toml index dbf8f05f..e370824f 100644 --- a/chirpstack/configuration/region_cn470_11.toml +++ b/chirpstack/configuration/region_cn470_11.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="cn470_11" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_cn470_2.toml b/chirpstack/configuration/region_cn470_2.toml index a37fc351..fdd55308 100644 --- a/chirpstack/configuration/region_cn470_2.toml +++ b/chirpstack/configuration/region_cn470_2.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="cn470_2" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_cn470_3.toml b/chirpstack/configuration/region_cn470_3.toml index 054eca1c..6b8ca253 100644 --- a/chirpstack/configuration/region_cn470_3.toml +++ b/chirpstack/configuration/region_cn470_3.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="cn470_3" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_cn470_4.toml b/chirpstack/configuration/region_cn470_4.toml index 412bf122..7db61a2f 100644 --- a/chirpstack/configuration/region_cn470_4.toml +++ b/chirpstack/configuration/region_cn470_4.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="cn470_4" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_cn470_5.toml b/chirpstack/configuration/region_cn470_5.toml index 68de4489..78b03d66 100644 --- a/chirpstack/configuration/region_cn470_5.toml +++ b/chirpstack/configuration/region_cn470_5.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="cn470_5" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_cn470_6.toml b/chirpstack/configuration/region_cn470_6.toml index 61fe2cd2..613ebcb5 100644 --- a/chirpstack/configuration/region_cn470_6.toml +++ b/chirpstack/configuration/region_cn470_6.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="cn470_6" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_cn470_7.toml b/chirpstack/configuration/region_cn470_7.toml index 8069e866..8894360a 100644 --- a/chirpstack/configuration/region_cn470_7.toml +++ b/chirpstack/configuration/region_cn470_7.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="cn470_7" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_cn470_8.toml b/chirpstack/configuration/region_cn470_8.toml index 28cb61e9..6785bf38 100644 --- a/chirpstack/configuration/region_cn470_8.toml +++ b/chirpstack/configuration/region_cn470_8.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="cn470_8" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_cn470_9.toml b/chirpstack/configuration/region_cn470_9.toml index 3e80fc5c..c6ef656a 100644 --- a/chirpstack/configuration/region_cn470_9.toml +++ b/chirpstack/configuration/region_cn470_9.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="cn470_9" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_cn779.toml b/chirpstack/configuration/region_cn779.toml index e1990ac5..41c0e280 100644 --- a/chirpstack/configuration/region_cn779.toml +++ b/chirpstack/configuration/region_cn779.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="cn779" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_eu433.toml b/chirpstack/configuration/region_eu433.toml index 41329830..eead589c 100644 --- a/chirpstack/configuration/region_eu433.toml +++ b/chirpstack/configuration/region_eu433.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="eu433" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_eu868.toml b/chirpstack/configuration/region_eu868.toml index 3d3c3a06..8c91b6e0 100644 --- a/chirpstack/configuration/region_eu868.toml +++ b/chirpstack/configuration/region_eu868.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="eu868" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_in865.toml b/chirpstack/configuration/region_in865.toml index 85407fce..39b73076 100644 --- a/chirpstack/configuration/region_in865.toml +++ b/chirpstack/configuration/region_in865.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="in865" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_ism2400.toml b/chirpstack/configuration/region_ism2400.toml index a895463e..e4b35d3e 100644 --- a/chirpstack/configuration/region_ism2400.toml +++ b/chirpstack/configuration/region_ism2400.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="ism2400" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_kr920.toml b/chirpstack/configuration/region_kr920.toml index 713c078e..82087b59 100644 --- a/chirpstack/configuration/region_kr920.toml +++ b/chirpstack/configuration/region_kr920.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="kr920" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_ru864.toml b/chirpstack/configuration/region_ru864.toml index 6174bf27..22211737 100644 --- a/chirpstack/configuration/region_ru864.toml +++ b/chirpstack/configuration/region_ru864.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="ru864" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_us915_0.toml b/chirpstack/configuration/region_us915_0.toml index 71ecdb0d..65d38d2a 100644 --- a/chirpstack/configuration/region_us915_0.toml +++ b/chirpstack/configuration/region_us915_0.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="us915_0" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_us915_1.toml b/chirpstack/configuration/region_us915_1.toml index 2a87d8d4..85e6d6c8 100644 --- a/chirpstack/configuration/region_us915_1.toml +++ b/chirpstack/configuration/region_us915_1.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="us915_1" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_us915_2.toml b/chirpstack/configuration/region_us915_2.toml index ed689181..bda65df7 100644 --- a/chirpstack/configuration/region_us915_2.toml +++ b/chirpstack/configuration/region_us915_2.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="us915_2" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_us915_3.toml b/chirpstack/configuration/region_us915_3.toml index 0e0c4c4a..fa58f584 100644 --- a/chirpstack/configuration/region_us915_3.toml +++ b/chirpstack/configuration/region_us915_3.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="us915_3" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_us915_4.toml b/chirpstack/configuration/region_us915_4.toml index f987acbc..3cd04675 100644 --- a/chirpstack/configuration/region_us915_4.toml +++ b/chirpstack/configuration/region_us915_4.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="us915_4" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_us915_5.toml b/chirpstack/configuration/region_us915_5.toml index b36f456f..3b0b388a 100644 --- a/chirpstack/configuration/region_us915_5.toml +++ b/chirpstack/configuration/region_us915_5.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="us915_5" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_us915_6.toml b/chirpstack/configuration/region_us915_6.toml index 5dd60abc..c2fa0b42 100644 --- a/chirpstack/configuration/region_us915_6.toml +++ b/chirpstack/configuration/region_us915_6.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="us915_6" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/configuration/region_us915_7.toml b/chirpstack/configuration/region_us915_7.toml index 6564a72e..b1e573cd 100644 --- a/chirpstack/configuration/region_us915_7.toml +++ b/chirpstack/configuration/region_us915_7.toml @@ -37,6 +37,16 @@ # '/' is automatically added to the prefix if it is configured. topic_prefix="us915_7" + # Shared subscription name. + # + # In case there are multiple ChirpStack instances sharing the same + # subscription name, then the MQTT broker will deliver a gateway event + # only to one subscriber. In case you have a production and + # test-environment connected to the same MQTT broker, make sure that + # each environment has its own subscription name, for example: + # chirpstack_prod and chirpstack_tst. + share_name="chirpstack" + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) server="tcp://localhost:1883" diff --git a/chirpstack/src/config.rs b/chirpstack/src/config.rs index 48a7147e..574c8f29 100644 --- a/chirpstack/src/config.rs +++ b/chirpstack/src/config.rs @@ -624,6 +624,7 @@ pub struct GatewayBackendMqtt { #[serde(with = "humantime_serde")] pub keep_alive_interval: Duration, pub v4_migrate: bool, + pub share_name: String, } impl Default for GatewayBackendMqtt { @@ -643,6 +644,7 @@ impl Default for GatewayBackendMqtt { tls_key: "".into(), keep_alive_interval: Duration::from_secs(30), v4_migrate: false, + share_name: "chirpstack".into(), } } } diff --git a/chirpstack/src/gateway/backend/mqtt.rs b/chirpstack/src/gateway/backend/mqtt.rs index 818d8ca4..325e0396 100644 --- a/chirpstack/src/gateway/backend/mqtt.rs +++ b/chirpstack/src/gateway/backend/mqtt.rs @@ -1,6 +1,4 @@ -use std::collections::hash_map::DefaultHasher; use std::collections::HashMap; -use std::hash::Hasher; use std::io::Cursor; use std::sync::RwLock; use std::time::Duration; @@ -27,7 +25,6 @@ use super::GatewayBackend; use crate::config::GatewayBackendMqtt; use crate::helpers::tls::{get_root_certs, load_cert, load_key}; use crate::monitoring::prometheus; -use crate::storage::{get_async_redis_conn, redis_key}; use crate::{downlink, uplink}; use lrwn::region::CommonName; @@ -187,6 +184,7 @@ impl<'a> MqttBackend<'a> { } else { conf.event_topic.clone() }; + let event_topic = format!("$share/{}/{}", conf.share_name, event_topic); async move { while connect_rx.recv().await.is_some() { @@ -318,22 +316,7 @@ async fn message_callback( ) { let topic = String::from_utf8_lossy(&p.topic); - let mut hasher = DefaultHasher::new(); - hasher.write(&p.payload); - let key = redis_key(format!("gw:mqtt:lock:{:x}", hasher.finish())); - let locked = is_locked(key).await; - let err = || -> Result<()> { - if locked? { - trace!( - region_id = region_config_id, - topic = %topic, - qos = ?p.qos, - "Message is already handled by different instance" - ); - return Ok(()); - } - let json = payload_is_json(&p.payload); info!( @@ -432,21 +415,6 @@ async fn message_callback( } } -async fn is_locked(key: String) -> Result { - let mut c = get_async_redis_conn().await?; - - let set: bool = redis::cmd("SET") - .arg(key) - .arg("lock") - .arg("PX") - .arg(5000) - .arg("NX") - .query_async(&mut c) - .await?; - - Ok(!set) -} - fn gateway_is_json(gateway_id: &str) -> bool { let gw_json_r = GATEWAY_JSON.read().unwrap(); gw_json_r.get(gateway_id).cloned().unwrap_or(false)