This feature is available on all CloudAMQP plans
RabbitMQ is a message broker that allows clients to connect over different open and standardized protocols such as AMQP, HTTP, STOMP, MQTT, MQTT over websockets and WebSockets/Web-Stomp.
WebSockets is a way to send real-time data between a client (such as a web browser) and a server, allowing for highly interactive user experiences with data stored or computed on a server. Websockets are useful when building applications that provide instant communication and/or real-time updates.
AMQP (Advanced Message Queuing Protocol) is an open standard application layer protocol. RabbitMQ was originally developed to support AMQP which is the "core" protocol supported by the RabbitMQ broker.
AMQP WebSockets offers full AMQP support and enables traffic transfer over WebSockets. Using AMQP WebSockets is essential if you have a web application that needs to communicate with the RabbitMQ server directly. Another use case for AMQP WebSockets is if you are behind a firewall that blocks TCP connections over ports 5671, 5672 but allows TCP connections on port 443 (https).
Since AMQP WebSockets implements the entire AMQP protocol, all typical AMQP features are available.
For new CloudAMQP plans, AMQP WebSockets install automatically by default and do not require additional installation or plugins.
If you want to run it on your own server, check out the cloudamqp/websocket-tcp-relay repository to learn more.
NOTE: When connecting to CloudAMQP via AMQP WebSockets, you should use a connection URL like:
const url = 'wss://test-small-ivory-rat.rmq2.cloudamqp.com/ws/amqp' const amqp = new AMQPWebSocketClient(url, "VHOST", "USERNAME", "YOUR_PASSWORD")
You must use the Secure WebSockets protocol(wss) and connect to the endpoint at “/ws/amqp”
AMQP WebSocket TCP relay Docker Image available at Docker Hub or by running:
docker run --rm -it -p 15670:15670 cloudamqp/websocket-tcp-relay --upstream tcp://container:5672