简体   繁体   English

WSO2 EI和mqtt经纪人

[英]WSO2 EI and mqtt broker

WSO2 MB use to have an scalable mqtt broker WSO2 MB用于拥有可伸缩的mqtt代理

http://wso2.com/library/articles/2015/10/article-using-wso2-message-broker-as-a-scalable-mqtt-broker/ http://wso2.com/library/articles/2015/10/article-using-wso2-message-broker-as-a-scalable-mqtt-broker/

now replaced by WSO2 EI 6.1.1. 现在被WSO2 EI 6.1.1取代。 It is not clear to me when the broker must be provided or it is running inside the product. 我不清楚何时必须提供代理或代理是否在产品中运行。 While some doc seems to imply the broker is already there, some other examples ask for a mosquito or wso2 mb (now unavailable) separate instalation. 虽然一些文档似乎暗示该经纪人已经存在,但其他一些示例要求单独安装蚊子或wso2 mb(现在不可用)。

https://docs.wso2.com/display/EI611/Sample+906%3A+Inbound+Endpoint+MQTT+Protocol+Sample https://docs.wso2.com/display/EI611/Sample+906%3A+Inbound+Endpoint+MQTT+Protocol+Sample

A simple test with a mqtt client shows that, after normal EI installation and run, there is no mqtt broker running in the configured params, 127.0.0:1883. 使用mqtt客户端进行的简单测试显示,在正常安装和运行EI之后,已配置的参数127.0.0:1883中没有运行mqtt代理。

    <mqtt enabled="true">
        <bindAddress>0.0.0.0</bindAddress>
        <defaultConnection enabled="true" port="1883" />

Should I install a separate mqtt broker? 我应该安装一个单独的mqtt代理吗? or there is a way to run the already existent broker in the legacy MB? 还是有一种方法可以在旧版MB中运行已经存在的代理? Thanks! 谢谢!

You can run the broker with WSO2 EI using the broker.sh file located at {EI_HOME}/bin directory. 您可以使用{EI_HOME} / bin目录中的broker.sh文件与WSO2 EI一起运行代理。

Another difference to note is once you start the broker you can see the following log 另一个需要注意的区别是,一旦启动代理,您将看到以下日志

Successfully connected to MQTT server on port 1886

Within WSO2 EI product, broker runs with an offset of 3. Therefore you have to use the 1886 port to connect. 在WSO2 EI产品中,代理运行时的偏移量为3。因此,必须使用1886端口进行连接。

if you want you can change the offset using the offset element found at {EI_HOME}/wso2/broker/conf/carbon.xml file 如果需要,可以使用{EI_HOME} /wso2/broker/conf/carbon.xml文件中的offset元素来更改偏移量

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM