How to connect to my MQTT Broker in Openshift

…衆ロ難τιáo~ 提交于 2019-12-08 05:44:36

问题


Following these two tutorials (https://www.anavi.org/article/182/ and http://wei-meilin.blogspot.tw/2014/05/red-hat-openshift-xpaas-simple-mqtt.html) I have installed a MQTT Broker using JBoss Fuse.

Although my mqtt-container disappears after a while (I don't know why) I can make a port-forwarding and test the broker.

But I would like to know how to connect directly to the broker. Do you know how to do it?

I have tried this tutorial (http://training.runcloudrun.com/advanced/16-Network-and-Protocols.md.html - AMQ Example) but I don't have access to "/var/lib/openshift/.httpd.d/sniproxy.cfg"


回答1:


I am the author of the first tutorial that you pointed out. If you want to use MQTT without local port forwarding please have a look at the remark at the article on my blog and the AMQ cartridge that demonstrates the SNI features:

The port forwarding is not convenient for real life cases, especially if the MQTT clients are working on embedded devices such as microcontrollers and it is recommended to use a SNI Proxy as explained here: http://training.runcloudrun.com/advanced/16-Network-and-Protocols.md.html




回答2:


I was using Online Openshift and that feature is only available for Enterprise edition.

Why doesn't Openshift have this feature (complete) in the Online mode?




回答3:


One way to work around is to use the mqtt over websocket feature with a DIY cartridge. See the SO question "How can I access socket through Openshift" for some pointers to further details about how to run websocket on openshift.

The mosquitto seems to have implemented the websocket feature though I have not verified by testing it out.



来源:https://stackoverflow.com/questions/28973608/how-to-connect-to-my-mqtt-broker-in-openshift

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!