博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
EMQ ---客户端上线自动订阅主题
阅读量:7088 次
发布时间:2019-06-28

本文共 629 字,大约阅读时间需要 2 分钟。

通过修改配置文件即可实现。

emq v2.3.11,软件架构做了调整,把功能集成在了emq_modules模块,/data/loaded_plugins默认会加载emq_modules。

我们只需要改动配置文件emqx-rel-2.3.11/deps/emq_modules/etc/emq_modules.conf

##--------------------------------------------------------------------## Subscription Module##-------------------------------------------------------------------- ## Enable Subscription Module.#### Value: on | offmodule.subscription = on ## Subscribe the Topics automatically when client connected.module.subscription.1.topic = %c/w## Qos of the subscription: 0 | 1 | 2

  

把module.subscription设置为on,

把module.subscription.1.topic设置为%c/w,%c是通配符,会自动切换成clientId。注意是%c,而不是$c。

 

转载地址:http://jyfql.baihongyu.com/

你可能感兴趣的文章
Android广播机制分析
查看>>
Android ADB工具-截图和录制视频(五)
查看>>
PHP/Javascript 数组定义 及JSON中的使用 ---OK
查看>>
php中urldecode()和urlencode()起什么作用啊
查看>>
UVA 11542 Square 高斯消元 异或方程组求解
查看>>
Nginx的内部(进程)模型
查看>>
基于设备树的controller学习(1)
查看>>
递归--练习1--noi3089爬楼梯
查看>>
慢慢过渡到个人博客
查看>>
深度学习 Deep Learning UFLDL 最新Tutorial 学习笔记 4:Debugging: Gradient Checking
查看>>
【转】spring boot web相关配置
查看>>
oc53--autorelease注意事项
查看>>
sigmod2017.org
查看>>
MongoDB集群运维笔记
查看>>
Python代码优化及技巧笔记(一)
查看>>
Caused by: java.lang.NoClassDefFoundError: org/apache/neethi/AssertionBuilderFactory
查看>>
Ocelot 集成Butterfly 实现分布式跟踪
查看>>
(转)各种语言写网络爬虫有什么优点缺点
查看>>
好用的端口监控软件:Port Explorer
查看>>
Cisco无线控制器配置Radius
查看>>