Вопрос

My goal is to visualize the incoming data stream on a browser. I have used activemq to queue the stream. A single message consumed from the queue looks like this: "int,date/time,int,string". I have to update my line graph on the browser (every 100ms). Any ideas?

Это было полезно?

Решение

It sounds like a use case for WebSocket.

There are many ways to implement it, but a rather nice blog post on the topic is presented here.

Another way is to use MQTT directly from the browser using javascript and subscribe to a topic with your updates. You have to forward your data to that topic, in this case. For that, you can use composite queues with forwardOnly=false.

Другие советы

If you're using ActiveMQ, you could enable its websockets interface: http://activemq.apache.org/websockets.html

In your browser code, use the STOMP over WebSocket library to subscribe to the queue. http://jmesnil.net/stomp-websocket/doc/

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top