Socket
Socket
Sign inDemoInstall

lightstreamer-jms-client

Package Overview
Dependencies
6
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    lightstreamer-jms-client

This package includes the resources needed to write a client for Lightstreamer JMS Extender.


Version published
Weekly downloads
3
increased by50%
Maintainers
1
Install size
460 kB
Created
Weekly downloads
 

Readme

Source

Lightstreamer JMS Extender Client

Use

Install the package using npm

npm install lightstreamer-jms-client

Create a Topic Connection and connect

var ls = require('lightstreamer-jms-client');
ls.TopicConnectionFactory.createTopicConnection("http://localhost:8080/", "HornetQ", null, null, {
  onConnectionCreated: function(conn) {
    var topicSession= conn.createSession(false, "PRE_ACK");
    .....
    conn.start();
  }
});

Create a Topic Subscription and send it to the server

var topic= topicSession.createTopic("stocksTopic");
var consumer= topicSession.createConsumer(topic, null);

Listen for messages

consumer.setMessageListener({
  onMessage: function(message) {
    var feedMessage= message.getObject();
    var key= feedMessage.itemName;
    var values= feedMessage.currentValues;
    console.log(values["stock_name"] + ": " + values["last_price"]);
  }
});

For further details check the API, the Developer Guide and the available examples

Keywords

FAQs

Last updated on 11 Dec 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc