activemq-artemis/examples/protocols/stomp/stomp-websockets
Clebert Suconic 57fa8b8271 [maven-release-plugin] prepare for next development iteration 2022-04-27 17:26:46 -04:00
..
chat ARTEMIS-1426 update stomp.js for chat example 2017-09-22 13:10:54 -04:00
src/main ARTEMIS-765 Improve Checkstyle 2016-09-30 11:12:09 -04:00
pom.xml [maven-release-plugin] prepare for next development iteration 2022-04-27 17:26:46 -04:00
readme.md ARTEMIS-1562 Refactor example documentation 2017-12-15 14:54:16 +00:00

readme.md

Stomp WebSockets Example

To run the example, simply type mvn verify from this directory, or mvn -PnoServer verify if you want to start and create the broker manually.

This example shows you how to configure ActiveMQ Artemis to send and receive Stomp messages from modern web browser using Web Sockets.

The example will start a ActiveMQ Artemis broker configured with Stomp over Web Sockets and JMS. Web browsers clients and Java application will exchange message using a JMS Topic.

Example step-by-step

To subscribe to the topic from your web browser, open the Chat Example from another tab. The chat example is preconfigured to connect to the ActiveMQ Artemis broker with the URL ws://localhost:61613 and subscribe to the JMS Topic (through its core address chat).

You can open as many Web clients as you want and they will all exchange messages through the topic

Documentation

A JavaScript library is used on the browser side to be able to use Stomp Over Web Sockets (please see its documentation for a complete description).