0.3.0 • Published 8 years ago

mqtt-timestamper v0.3.0

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
8 years ago

This is a small utility that adds timestamps to MQTT JSON messages

Installation

npm install --save mqtt-timestamper

Usage

var Timestamper = require('mqtt-timestamper');
var mqtt    = require('mqtt');
var client  = mqtt.connect('mqtt://test.mosquitto.org');

var timestamper = new Timestamper(client, 'sensors/#', function(topic) {
    return 'stamped/' + topic.slice('sensors/'.length);
}, {
    qos: 2
});

setTimeout(function() {
    timestamper.unsubscribe();
    timestamper.stop();
    client.end();
}, 1000);
0.3.0

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago