zenoh
zenoh copied to clipboard
Zenoh Mqtt Bridge and MQTT Remote to Bridge
Describe the bug
I got a error, mqtt client connect zenoh mqtt bridge for took topics
MQTT client c983d3fc794d.bridge-to-remote Error received: Invalid Key Expr $SYS/broker/connection/c983d3fc794d.bridge-to-remote/state: $ is only allowed in $* at /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/zenoh-keyexpr-1.5.1/src/key_expr/borrowed.rs:754.
my config.json5 for zenoh
{
mode: "client", // peer or client
connect: {
endpoints: [
"tcp/zenoh-router:7447",
// "tcp/mosquitto:1883"
]
},
listen: {
endpoints: [
"tcp/0.0.0.0:7448"
]
},
plugins: {
rest: {
http_port: 8000,
},
mqtt: {
port: "1883",
scope: "mqtt/demo",
// allow: ".*",
// deny: "private/.*|\\$SYS/.*",
allow: ".*",
deny: "^\\$SYS/.*|^private/.*",
generalise_subs: [
"sensor/**",
"device/**",
"data/**"
],
generalise_pubs: [
"sensor/**",
"device/**",
"data/**"
],
tx_channel_size: 65536,
}
},
plugins_loading: {
enabled: true
}
}
mosquitto config.conf file
# Mosquitto Configuration File
# Listener settings
listener 1883
protocol mqtt
# WebSocket support (optional)
listener 9001
protocol websockets
# IMPORTANT: Disable system messages or only allow specific topics
sys_interval 0
# Connection settings
allow_anonymous true
max_connections -1
# Bridge settings
connection bridge-to-remote
address zenoh-mqtt-bridge:1883
topic sensor/# both 0
topic device/# both 0
topic data/# both 0
bridge_protocol_version mqttv311
try_private false
cleansession true
# Persistence
persistence true
persistence_location /mosquitto/data/
# Logging
log_dest file /mosquitto/log/mosquitto.log
log_dest stdout
log_type all
log_timestamp true
log_timestamp_format %Y-%m-%d %H:%M:%S
# Security (add password in production)
# password_file /mosquitto/config/passwd
acl_file /mosquitto/config/acl.conf
# Connection messages - DISABLE to prevent $SYS topics
connection_messages false
# Retained messages
retained_persistence true
# Quality of Service
max_queued_messages 1000
message_size_limit 0
# Client ID
persistent_client_expiration 1h
# Autosave interval
autosave_interval 300
To reproduce
- Mqtt Client Zenoh Bridge
System info
- Platform MacOS Senoquia
- M1 Processor