- Install and Make sure you have rabbitmq running
gem install bunny
- enable rabbitmq plugin
rabbitmq-plugins enable rabbitmq_web_stomp
- start file_server by
ruby server.rb
- open js_stomp.html in browser and wait for approx 5 second to see the popup with response.
- ruby script (server.rb) subscribes to
rpc_queue
queue and waits - html page (js_stomp.html) when opened in browser sends message to
rpc_queue
queue. withreply-to
header containing reply channel name - html page then and subscribes to that
reply-to
channel and waits to receive a file. - ruby script server gets the message and responds with file (test.csv) as a string on channel specified in
reply-to
header. - html page receives the message and shows the alert box with all message details.
Endpoint: ws://localhost:15674/ws
login: guest
passcode: guest