I get the exampe snippet to publish and subscribe below, i didn't run with Node JS 6 and mqlight v2.0
// Receive:
var mqlight = require('mqlight');
var recvClient = mqlight.createClient({service: 'amqp://user:user@localhost:5672'});
recvClient.on('started', function() {
recvClient.subscribe('/TEST/#','sub1');
recvClient.on('message', function(data, delivery) {
          console.log(data);
     });
});
// Send:
 var sendClient = mqlight.createClient({service: 'amqp://user:user@localhost:5672'});
 sendClient.on('started', function() {
     sendClient.send('TEST');
});
Hope anyone can help.
Thanks
via dhaavhincy
 
No comments:
Post a Comment