I'm trying to connect to the WebSocket endpoint on AmazonMQ (ActiveMQ) from a webpage (hosted on HTTPS).
let wsURL = "wss://url_to_mq:61619";
let wssConn = new WebSocket(wsURL);
This reports a failure to connect to the WebSocket.
On AmazonMQ, I defined port 61619 to be open to all IPs in the security group.
How can I utilize the wss endpoint from the AmazonMQ dashboard to directly connect from my website to ActiveMQ?
After further exploration, it appears that only stomp fully negotiates (and authenticates) the connection of a Websocket from a js-based frontend to an Amazonmq (ActiveMQ) backend. The WSS endpoints are passed directly to the stomp client in the following manner given that stomp.js is added to the page:
I hope this helps the next individual seeking this solution and may be confused as to why the WSS endpoints do not directly work with a direct WebSocket instantiation.