{"id":13691010,"url":"https://github.com/KxSystems/mqtt","last_synced_at":"2025-05-02T11:31:58.057Z","repository":{"id":45634562,"uuid":"244684165","full_name":"KxSystems/mqtt","owner":"KxSystems","description":"MQTT messaging protocol interface","archived":false,"fork":false,"pushed_at":"2024-05-02T11:34:19.000Z","size":148,"stargazers_count":9,"open_issues_count":2,"forks_count":12,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-07T16:09:54.262Z","etag":null,"topics":["kdb","mqtt","q"],"latest_commit_sha":null,"homepage":"https://code.kx.com/q/interfaces","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KxSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-03-03T16:19:58.000Z","updated_at":"2024-05-02T11:34:23.000Z","dependencies_parsed_at":"2024-04-08T01:59:54.448Z","dependency_job_id":null,"html_url":"https://github.com/KxSystems/mqtt","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KxSystems%2Fmqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KxSystems%2Fmqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KxSystems%2Fmqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KxSystems%2Fmqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KxSystems","download_url":"https://codeload.github.com/KxSystems/mqtt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224308824,"owners_count":17290069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kdb","mqtt","q"],"created_at":"2024-08-02T17:00:38.568Z","updated_at":"2024-11-12T16:32:04.557Z","avatar_url":"https://github.com/KxSystems.png","language":"C","funding_links":[],"categories":[":fireworks: Fusion interfaces"],"sub_categories":[],"readme":"# ![MQTT](mqtt.png) `mqtt` - MQTT for kdb+\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/kxsystems/mqtt?include_prereleases)](https://github.com/kxsystems/mqtt/releases) [![Travis (.org) branch](https://img.shields.io/travis/kxsystems/mqtt/master?label=travis%20build)](https://travis-ci.org/kxsystems/mqtt/branches)\n\nThis interface lets you communicate with an MQTT broker from a kdb+ session. \nThe interface follows closely the [PAHO MQTT C API](https://github.com/eclipse/paho.mqtt.c). \nExposed functionality includes\n\n-   connect to a MQTT broker\n-   subscribe to topics\n-   publish to a broker\n\nThis is part of the [_Fusion for kdb+_](http://code.kx.com/q/interfaces#fusion/) interface collection.\n\n## New to kdb+ ?\n\nKdb+ is the world’s fastest timeseries database, optimized for ingesting, analyzing and storing massive amounts of structured data. To get started with kdb+, please visit https://code.kx.com/q/learn/ for downloads and developer information. For general information, visit https://kx.com/\n\n## New to MQTT ?\n\nMessage Queueing Telemetry Transport (MQTT) is a machine-to-machine/IOT connectivity protocol. It is designed to provide a lightweight publish/subscribe messaging protocol.\n\nMQTT is used commonly for constrained devices with low-bandwidth, high-latency or unreliable networks.\n\n### Use cases\n\nThis messaging protocol is used extensively where a small software footprint is required, e.g.\n\n-   communication with edge devices/sensors\n-   home automation\n-   mobile applications\n\n:globe_with_meridians:\n[MQTT: Real-world applications](https://en.wikipedia.org/wiki/MQTT#Real-world_applications \"Wikipedia\")\n\n## API Documentation\n\n:point_right: [`API reference`](docs/reference.md)\n\n## Installation Documentation\n\n:point_right: [`Install guide`](docs/install.md)\n\n## Debugging/Tracing\n\n:point_right: The underlying Paho MQTT library provides the ability to log diagnostic information to standard out or log files via an [environment variable](https://en.wikipedia.org/wiki/Environment_variable) as detailed [here](https://eclipse.dev/paho/files/mqttdoc/MQTTClient/html/tracing.html)\n\n## Building From Source\n\n:point_right: [`Building guide`](docs/build.md)\n\n## Quick start\n\n### Requirements\n\nTo run the examples you will need a MQTT broker e.g.\n\n- [Mosquitto broker](https://mosquitto.org/download/)\n\n### Start Mosquitto\n\nStart Mosquitto on default port `localhost:1883`.\n\n```bash\nsudo systemctl start mosquitto\n```\n\n### Launch consumer\n\nWe assume you are in the source directory of the MQTT-kdb+ interface.\n\n```bash\nmqtt]$ cd q\nq]$ q ../examples/consumer.q \n```\n\n\n### Launch producer\n\nIn the same directory as the one launching a consumer, run:\n\n```bash\nq]$ q ../examples/producer.q\n```\n\n\nThen pubish a message by a timer, say every second:\n\n```q\nq)\\t 1000\n```\n\nGoing back to the console of consumer, now you can see received messages in `.mqtt.tab`:\n\n```q\nq).mqtt.tab\ntopic  msg_sent                      msg_recv                      received_m..\n-----------------------------------------------------------------------------..\ntopic1 2021.01.06D13:24:46.267356000 2021.01.06D13:24:46.267718000 topic1_3  ..\ntopic2 2021.01.06D13:24:46.267450000 2021.01.06D13:24:46.368412000 topic2_3  ..\ntopic1 2021.01.06D13:24:47.267366000 2021.01.06D13:24:47.268676000 topic1_4  ..\ntopic2 2021.01.06D13:24:47.267624000 2021.01.06D13:24:47.372268000 topic2_4  ..\ntopic1 2021.01.06D13:24:48.276623000 2021.01.06D13:24:48.277677000 topic1_5  ..\ntopic2 2021.01.06D13:24:48.276801000 2021.01.06D13:24:48.377926000 topic2_5  ..\ntopic1 2021.01.06D13:24:49.267324000 2021.01.06D13:24:49.268228000 topic1_6  ..\ntopic2 2021.01.06D13:24:49.267482000 2021.01.06D13:24:49.368805000 topic2_6  ..\ntopic1 2021.01.06D13:24:50.267684000 2021.01.06D13:24:50.268125000 topic1_7  ..\ntopic2 2021.01.06D13:24:50.267804000 2021.01.06D13:24:50.368889000 topic2_7  ..\n```\n\n\n## Status\n\nThe interface is currently available under an Apache 2.0 license and is supported on a best-efforts basis by the KX Fusion team. The interface is currently in active development, with additional functionality released on an ongoing basis.\n\n:point_right:\n[Issues and feature requests](../../../issues) \n\n:point_right:\n[Guide to contributing](../CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKxSystems%2Fmqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKxSystems%2Fmqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKxSystems%2Fmqtt/lists"}