在发布或订阅ACL-Forbiddid的主题时,如何获得反馈? 我想限制我的微服务以发布和/或仅在我的Eclipse Mosquitto Broker(2.0.20,Docker)中发布特定的MQTT主题。 我的ACL文件中的限制正常,但是我不能...

问题描述 投票:0回答:0

mosquitto.acl

user joe topic readwrite allowed

mosquitto.conf

allow_anonymous false
password_file /mosquitto/config/passwd
listener 1883 0.0.0.0
log_dest stdout
log_type all
acl_file /mosquitto/config/mosquitto.acl

当我发布via

mosquitto_pub -t forbidden -m hi --debug -u joe --pw pwdjoe1

我获取

EXIT代码0
no警告

。但是没有通知订户(发现并应用ACL)。调试输出是:

Client null sending CONNECT
Client null received CONNACK (0)
Client null sending PUBLISH (d0, q0, r0, m1, 'forbidden', ... (2 bytes))
Client null sending DISCONNECT

我尝试了什么: QOS 0、1和2的标签行为 用私人用户对“ $ sys/#”的订阅不会产生任何消息

出版主题
allowed

产生相同的输出,但所有订户都将收到该消息。

  • 请回答,您没有。
  • Mosquitto只会默默丢弃客户无法发布的主题的消息。
  • 同样,它只是没有传递您无法订阅的消息。
  • 
    
mqtt acl mosquitto qos
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.