NO-JIRA update MQTT docs for WSS

This commit is contained in:
Justin Bertram 2023-01-27 11:10:16 -06:00 committed by GitHub
parent 6e10908c50
commit 009f539406
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 2 deletions

View File

@ -169,13 +169,23 @@ browsers which support Web Sockets can send and receive MQTT messages.
MQTT over Web Sockets is supported via a normal MQTT acceptor:
```xml
<acceptor name="mqtt-ws-acceptor">tcp://localhost:1883?protocols=MQTT</acceptor>
<acceptor name="mqtt-ws-acceptor">tcp://host: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.
SSL/TLS is also available, e.g.:
```xml
<acceptor name="mqtt-wss-acceptor">tcp://host:8883?protocols=MQTT;sslEnabled=true;keyStorePath=/path/to/keystore;keyStorePassword=myPass</acceptor>
```
Web browsers can then connect to `wss://<server>:8883` using a Web Socket to
send and receive MQTT messages.
## Automatic Subscription Clean-up
Sometimes MQTT clients don't clean up their subscriptions. In such situations
@ -314,4 +324,4 @@ MQTT `acceptor` in `broker.xml`, e.g.:
```xml
<acceptor name="mqtt">tcp://0.0.0:1883?protocols=MQTT;closeMqttConnectionOnPublishAuthorizationFailure=false</acceptor>
```
```