npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

kolvin-mqtt-recorder

v1.0.4

Published

MQTT recorder client to record mqtt payloads

Downloads

10

Readme

Kolvin MQTT Recorder

Kolvin MQTT Recorder is working as a MQTT client that records every payload receiving to a provided topic. It is using a specialy design folder structure to store the data.

Please follow https://mqtt.org/ if you do not know what is MQTT.


Installation

$ npm install kolvin-mqtt-recorder

Prerequisite

You need to configure a MQTT broker in a server and generate necessary authentication (Username, password, certificate file etc.) to connect.

OR

You need to have necessary authentication to connect to a MQTT broker that already running.

- IMPORTANT: Your application need to have Read and Write permissions to create, write, read and delete files and folders.

Usage

Kolvin MQTT Recorder is using MQTT NPM library to initialize the connection from the provided MQTT broker configurations. Example showing below is how to initialize MQTT connection and start recording.

    import MQTT from 'kolvin-mqtt-recorder';

    const mqttHostAddress = 'mqtt://test.mosquitto.org/';

    const authenticationOptions = {
      port: 1883,
      username: 'username',
      password: 'password'
    };

    const topic = 'kolvinmqttrecorder/mqttTest'

    MQTT.mqttClientInitialize(mqttHostAddress, authenticationOptions, topic);

In the example, there are only three options provided inside authenticationOptions. There are multiple options you can provide. Please check MQTT connect API for more connection options.

How It's Working

After initializing Kolvin MQTT Recorder, it will subscribe to the Topic provided when initializing. According to the above example it will subscribe to below topic.

kolvinmqttrecorder/mqttTest/#

Recorder will create folder named records inside the Root directory. All the recorded data are inside this folder.

Let's say someone is publishing data to below topic.

kolvinmqttrecorder/mqttTest/recorder

Now the recorder will record data to *history.rec file in the below path.

Project_Root_Directory/records/kolvinmqttrecorder/mqttTest/recorder/history.rec

This is example view inside the history.rec file. All payloads recorded with the timestamp when it received.

2021-07-28T07:40:26.543Z * { message: 'This'}
2021-07-28T07:40:26.543Z * { message: 'is'}
2021-07-28T07:40:26.543Z * { message: 'test'}

License

MIT