【activemq artemis】关于MQTT协议的WebSocket配置

官方文档:http://activemq.apache.org/components/artemis/documentation/latest/mqtt.html

Web Sockets

Apache ActiveMQ Artemis also supports MQTT over Web Sockets. Modern web browsers which support Web Sockets can send and receive MQTT messages.

MQTT over Web Sockets is supported via a normal MQTT acceptor:

<acceptor name="mqtt-ws-acceptor">tcp://localhost:1883?protocols=MQTT</acceptor>

With this configuration, Apache ActiveMQ Artemis will accept MQTT connections over Web Sockets on the port 1883. Web browsers can then connect to ws://<server>:1883 using a Web Socket to send and receive MQTT messages.

posted @ 2020-09-22 14:14  Bill he  阅读(715)  评论(0编辑  收藏  举报