This project includes a demo client showing integration between Lightstreamer JMS Extender JavaScript Client Library and the Node.js platform
JavaScript
Latest commit 4d5d7a7 Dec 30, 2015 @gianlucabertani gianlucabertani Minor fix to README
Permalink
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
package.json
screen_node_large.png
screen_node_small.png

README.md

Lightstreamer JMS Extender - Basic Stock-List Demo - Node.js Client

This project includes a demo client showing integration between Lightstreamer JMS Extender JavaScript Client Library and the Node.js platform.

Screenshot

Details

This demo displays real-time market data for 20 stocks, generated by the feed simulator included in the Stock-List Demo Java Service. For simplicity, only the "stock_name" and "last_price" fields of updated items are displayed, and they are just logged to the console. Moreover, a single JMS topic is used for all stocks, while in a real scenario you would probably use a different JMS topic for each stock.

This example uses the Lightstreamer JMS Extender JavaScript Client API to handle the communications with JMS Extender.

Check out the sources for further explanations.

Install

If you want to install a version of this demo pointing to your local Lightstreamer JMS Extender, follow these steps. In particular, this readme file details the steps required to execute the demo calling the node executable from the command line.

  • Note that, as prerequisite, the Lightstreamer JMS Extender - Stock-List Demo - Java (JMS) Service has to be deployed on your local Lightstreamer JMS Extender instance. Please check out that project and follow the installation instructions provided with it.
  • Launch Lightstreamer JMS Extender.
  • Get the lightstreamer-jms-client package using npm:

    • npm install lightstreamer-jms-client

    or from the root folder of this project simply run:

    • npm install

Now, you need to configure src/index.js of this example by specifying the name of the JMS connector you are going to use. By default, the demo will look for the HornetQ JMS connector, please refer to the related Service project for more details on the choice of a JMS broker to be used. To set the JMS connector name, look where the connection is created:

  TopicConnectionFactory.createTopicConnection("http://localhost:8080/", "HornetQ", null, null, {

You can now run the included example. From the root folder of this project run

node src/index.js

or

iojs src/index.js

See Also

Lightstreamer Service Needed by This Demo Client

Related Projects

Lightstreamer Compatibility Notes

  • Compatible with Lightstreamer JMS Extender JavaScript Client library since version 1.2 or newer.
  • Compatible with Lightstreamer JMS Extender since version 1.5 or newer.