An open API service indexing awesome lists of open source software.

https://github.com/spearwolf/websocket-stomp-bridge

a simple websocket to stomp bridge
https://github.com/spearwolf/websocket-stomp-bridge

Last synced: about 1 year ago
JSON representation

a simple websocket to stomp bridge

Awesome Lists containing this project

README

          

A Simple WebSocket To Stomp Bridge
==================================

+-----------+
+------------------+ | websocket | +----------------------+
| websocket client |<<<---[ WebSocket ]--->>>| stomp |<<<---[ STOMP ]--->>>| stomp message broker |
| ( browser ) | | bridge | | ( activemq ) |
+------------------+ +-----------+ +----------------------+
|
______________________V_____________________
| |
| class WsStompBridge::ClientConnection |
| |
| def on_websocket_connect |
| subscribe_to '/queue/public' |
| end |
| |
| def on_websocket_message(msg) |
| publish '/queue/worker', msg |
| end |
| |
| def on_websocket_disconnect |
| #unsubscribe '/queue/public' |
| unsubscribe_all |
| end |
| |
| def on_stomp_message(msg) |
| send_to_client(msg) |
| end |
| end |
| |
============================================

© 2010 by Wolfger Schramm