官方文档:https://www.rabbitmq.com/web-stomp.html
rabbitmq-plugins enable rabbitmq_web_stomp
systemctl restart rabbitmq-server
[root@ecs-88500735 ~]# rabbitmq-plugins enable rabbitmq_web_stomp
The following plugins have been enabled:
rabbitmq_stomp
cowboy
sockjs
rabbitmq_web_stomp
Plugin configuration has changed. Restart RabbitMQ for changes to take effect.
rabbitmq-plugins enable rabbitmq_web_stomp_examples
systemctl restart rabbitmq-server
[root@ecs-88500735 ~]# rabbitmq-plugins enable rabbitmq_web_stomp_examples
The following plugins have been enabled:
rabbitmq_web_stomp_examples
Plugin configuration has changed. Restart RabbitMQ for changes to take effect.
[root@ecs-88500735 ~]# systemctl restart rabbitmq-server
[root@ecs-88500735 ~]#
The examples will be available under http://127.0.0.1:15670/ url. You will see two examples:
“echo” - shows how to use STOMP to do simple message broadcasting
“bunny” - example of a simple collaboration canvas painting app