Search code examples
activemq-classicreal-timevisualization

Best way to display dynamic data in a webpage


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?


Solution

  • 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.