简体   繁体   中英

WSO2 EI and mqtt broker

WSO2 MB use to have an 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. 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.

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 enabled="true">
        <bindAddress>0.0.0.0</bindAddress>
        <defaultConnection enabled="true" port="1883" />

Should I install a separate mqtt broker? or there is a way to run the already existent broker in the legacy MB? Thanks!

You can run the broker with WSO2 EI using the broker.sh file located at {EI_HOME}/bin directory.

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.

if you want you can change the offset using the offset element found at {EI_HOME}/wso2/broker/conf/carbon.xml file

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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