-
Notifications
You must be signed in to change notification settings - Fork 13
/
DEFAULT_CONFIG.json5
158 lines (140 loc) · 6.51 KB
/
DEFAULT_CONFIG.json5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
////
//// This file presents the default configuration used by both the `zenoh-plugin-mqtt` plugin and the `zenoh-bridge-mqtt` standalone executable.
//// The "mqtt" JSON5 object below can be used as such in the "plugins" part of a config file for the zenoh router (zenohd).
////
{
plugins: {
////
//// MQTT related configuration
//// All settings are optional and are unset by default - uncomment the ones you want to set
////
mqtt: {
////
//// port: The address to bind the MQTT server. Default: "0.0.0.0:1883". Accepted values:'
//// - a port number ("0.0.0.0" will be used as IP to bind, meaning any interface of the host)
//// - a string with format `<local_ip>:<port_number>` (to bind the MQTT server to a specific interface).
////
// port: "0.0.0.0:1883",
////
//// scope: A string added as prefix to all routed MQTT topics when mapped to a zenoh resource.
//// This should be used to avoid conflicts when several distinct MQTT systems using
//// the same topics names are routed via zenoh.
////
// scope: "home-1",
////
//// allow: A regular expression matching the MQTT topic name that must be routed via zenoh. By default topics are allowed.
//// If both '--allow' and '--deny' are set a topic will be allowed if it matches only the 'allow' expression.
////
// allow: "zigbee2mqtt|home-1/room-2",
////
//// deny: A regular expression matching the MQTT topic name that must not be routed via zenoh. By default no topics are denied.
//// If both '--allow' and '--deny' are set a topic will be allowed if it matches only the 'allow' expression.
////
// deny: "zigbee2mqtt|home-1/room-2",
////
//// generalise_subs: A list of key expression to use for generalising subscriptions.
////
// generalise_subs: ["SUB1", "SUB2"],
////
//// generalise_subs: A list of key expression to use for generalising publications.
////
// generalise_subs: ["PUB1", "PUB2"],
////
//// tx_channel_size: Size of the MQTT transmit channel (default: 65536).
//// The channel buffers messages from Zenoh until they can be sent to MQTT clients.
//// If the channel capacity is reached new messages from Zenoh will be dropped until space becomes available.
////
// tx_channel_size: 65536,
////
//// TLS related configuration (MQTTS active only if this part is defined).
////
// tls: {
// ////
// //// server_private_key: TLS private key provided as either a file or base 64 encoded string.
// //// One of the values below must be provided.
// ////
// // server_private_key: "/path/to/private-key.pem",
// // server_private_key_base64: "base64-private-key",
//
// ////
// //// server_certificate: TLS public certificate provided as either a file or base 64 encoded string.
// //// One of the values below must be provided.
// ////
// // server_certificate: "/path/to/certificate.pem",
// // server_certificate_base64: "base64-certificate",
//
// ////
// //// root_ca_certificate: Certificate of the certificate authority used to validate clients connecting to the MQTT server.
// //// Provided as either a file or base 64 encoded string.
// //// This setting is optional and enables mutual TLS (mTLS) support if provided.
// ////
// // root_ca_certificate: "/path/to/root-ca-certificate.pem",
// // root_ca_certificate_base64: "base64-root-ca-certificate",
// },
////
//// This plugin uses Tokio (https://tokio.rs/) for asynchronous programming.
//// When running as a plugin within a Zenoh router, the plugin creates its own Runtime managing 2 pools of threads:
//// - worker threads for non-blocking tasks. Those threads are spawn at Runtime creation.
//// - blocking threads for blocking tasks (e.g. I/O). Those threads are spawn when needed.
//// For more details see https://github.com/tokio-rs/tokio/discussions/3858#discussioncomment-869878
//// When running as a standalone bridge the Zenoh Session's Runtime is used and can be configured via the
//// `ZENOH_RUNTIME` environment variable. See https://docs.rs/zenoh-runtime/latest/zenoh_runtime/enum.ZRuntime.html
////
//// work_thread_num: The number of worker thread in the asynchronous runtime will use. (default: 2)
//// Only for a plugin, no effect on a bridge.
// work_thread_num: 2,
//// max_block_thread_num: The number of blocking thread in the asynchronous runtime will use. (default: 50)
//// Only for a plugin, no effect on a bridge.
// max_block_thread_num: 50,
////
//// MQTT client authentication related configuration.
////
// auth: {
// ////
// //// dictionary_file: Path to a file containing the MQTT client username/password dictionary.
// ////
// dictionary_file: "/path/to/dictionary-file",
// },
},
////
//// REST API configuration (active only if this part is defined)
////
// rest: {
// ////
// //// The HTTP port number (for all network interfaces).
// //// You can bind on a specific interface setting a "<local_ip>:<port>" string.
// ////
// http_port: 8000,
// },
},
////
//// zenoh related configuration (see zenoh documentation for more details)
////
////
//// id: The identifier (as hex-string) that zenoh-bridge-mqtt must use. If not set, a random UUIDv4 will be used.
//// WARNING: this id must be unique in your zenoh network.
// id: "A00001",
////
//// mode: The bridge's mode (peer or client)
////
//mode: "client",
////
//// Which endpoints to connect to. E.g. tcp/localhost:7447.
//// By configuring the endpoints, it is possible to tell zenoh which router/peer to connect to at startup.
////
connect: {
endpoints: [
// "<proto>/<ip>:<port>"
]
},
////
//// Which endpoints to listen on. E.g. tcp/localhost:7447.
//// By configuring the endpoints, it is possible to tell zenoh which are the endpoints that other routers,
//// peers, or client can use to establish a zenoh session.
////
listen: {
endpoints: [
// "<proto>/<ip>:<port>"
]
},
}