Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Lightstreamer JMS Extender - Stock-List Demo - Java (JMS) Service

This project contains the source code and all the resources needed to install the Stock-List Demo Service for Lightstreamer JMS Extender.

The Stock-List Demo Service is stand-alone Java application that acts as a service, sending simulated stock quotes to a JMS topic. It provides data for client-side Stock-List Demos for JMS Extender, such as the HTML Demo and the Node.js Demo.

Note that this service makes no use of the JMS Extender APIs: it works by using directly the JMS APIs. For simplicity, 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.

Check out the sources for further explanations.


If you want to install a version of this demo pointing to your local Lightstreamer JMS Extender, follow these steps:

Configure the JMS Broker

As prerequisite, this demo needs a JMS infrastructure to run. You can choose whatever JMS broker you prefer to be used for this example. We will show 3 examples using Apache ActiveMQ, Apache ActiveMQ Artemis, and TIBCO EMS:

Apache ActiveMQ

There's no need to create topics or queues, because ActiveMQ supports dynamic configuration of destinations.

Apache ActiveMQ Artemis

There's no need to create topics or queues, because ActiveMQ Artemis supports dynamic configuration of destinations.


  1. You should create a new topic. Open the topics.conf file and append to it stocksTopic.

  2. Copy tibjms.jar from <EMS_HOME>/lib to the local_libs folder.

NOTE: In the case of a different JMS broker, please follow the relative instructions on how to properly configure a topic. Furthermore, add an entry to the dependencies section in the build.gradle (read the inline comments for more details).

Configure the Demo Service

To configure the demo service, follow these steps:

  1. Edit the set of settings as per the configuration of the selected JMS broker in the src/main/resources/service.conf file. If you want use a different broker, add the relative settings following the provided samples. All parameters are mandatory.

  2. Check the logging configuration file src/main/resources/logback.xml.

Build the Demo Service

To build the demo service, run Gradle as follows:

$ ./gradlew buildDemo -Pbroker=<JMS Broker>

where the broker property can be:

  • ActiveMQ
  • Artemis
  • the <JMS_BROKER> string you specified in the he dependencies section of build.gradle in the case of different JMS broker.

The buildDemo task will create a distribution of the project under the build/install/stocklist-demo-service folder, from which you can start the service.

Moreover, the build/deploy folder will be populated with all the JMS broker-specific jar files to be deployed into your local JMS Extender installation. In addition, feedmessage-X.Y.Z.jar will contains the FeedMessage class required by the Extender to create any object sent or received by its clients.

Start the Demo Service

From the build/install/stocklist-demo-service directory, run the launch script to start sending simulated messages to the JMS broker:

$ ./bin/stocklist-demo-service

or launch bin/stocklist-demo-service.bat on Windows systems.

Set up Lightstreamer JMS Extender

  1. The JMS Extender StockList Demo requires a Lightstreamer JMS Extender instance running. Please refer to Lightstreamer web site download page to find Lightstreamer JMS Extender download packages.

  2. Now copy the jar files from build/deploy under the <JMS_EXTENDER_HOME>/jms_connectors/lib folder.

  3. Edit the <JMS_EXTENDER_HOME>/jms_connectors/jms_connectors_conf.xml file, ensuring that the sample JMS connector configuration relative to the selected JMS broker is enabled. In particular, check that the disabled parameter is set to false:

    <param name="disabled">false</param>

    NOTE: Add a new JMS connector configuration in the case you want to use a differente JMS broker: see the inline comments for details.

Now you can test this demo running the Lightstreamer JMS Extender - Basic Stock-List Demo - HTML Client.

See Also

Clients Using This Service

Related Projects

Lightstreamer Compatibility Notes

  • Compatible with Lightstreamer JMS Extender since version 2.0.0 or newer.


This project contains the source code and all the resources needed to install the StockList Demo Service for Lightstreamer JMS Extender







No packages published