New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lightstreamer-jms-client

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

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.

  • 1.2.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 11 Dec 2015

Did you know?

Socket

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc