SHARE
TWEET

Untitled

a guest Jun 18th, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jmsTemplate.convertAndSend("topic", "Hello World!");
  2.      
  3. let mqtt = require('mqtt')
  4.     let options ={
  5.         clientId:"test",
  6.         username:"username",
  7.         useSSL: true,
  8.         password:"password",
  9.         clean:true};
  10.     let client  = mqtt.connect(
  11.         'wss://someUrl.com:61619',
  12.         options);
  13.  
  14.     client.on('connect', function () {
  15.         client.subscribe('myTopic', function (err) {
  16.             if (!err) {
  17.                 console.log("successfully connected to myTopic'");
  18.             }
  19.         })
  20.     });
  21.  
  22.     client.on('message', function (topic, message) {
  23.         console.log(message.toString());
  24.     });
  25.      
  26. S�A S�)�x-opt-jms-destQ�x-opt-jms-msg-typeQ Ss�   f
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top