RABBITMQ Concept and Environment Building (v) integration with the web

Source: Internet
Author: User
Tags stomp rabbitmq

####################################
Rabbitmq_web_stomp
####################################
In the pilot phase, the partner WebSocket compatibility layer SOCKJS when the Web browser and RABBITMQ (Rabbitmq-stomp) real-time communication, can be used in real-time web applications
Installation
sudo rabbitmq-plugins enable Rabbitmq_web_stomp
Test
Http://127.0.0.1:15674/stomp

Use

<script src= "Http://cdn.sockjs.org/sockjs-0.3.min.js" ></script>
<script src= "Stomp.js" ></script>
<script>
var ws = new Sockjs (' Http://127.0.0.1:15674/stomp ');
var client = Stomp.over (WS);
[...]
[...]
var on_connect = function () {
Console.log (' connected ');
};
var on_error = function () {
Console.log (' error ');
};
Client.connect (' guest ', ' guest ', On_connect, On_error, '/');
[...]

Reference:
Http://www.rabbitmq.com/web-stomp.html

RABBITMQ Concept and Environment Building (v) integration with the web

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.