{"id":18579023,"url":"https://github.com/lpeterse/haskell-hummingbird","last_synced_at":"2025-04-10T10:31:24.750Z","repository":{"id":66327448,"uuid":"75204885","full_name":"lpeterse/haskell-hummingbird","owner":"lpeterse","description":"Multi-threaded MQTT broker written in Haskell.","archived":false,"fork":false,"pushed_at":"2020-06-29T12:17:38.000Z","size":175,"stargazers_count":21,"open_issues_count":13,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T10:11:31.659Z","etag":null,"topics":["broker","haskell","mqtt","mqtt-broker"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lpeterse.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2016-11-30T16:22:14.000Z","updated_at":"2021-09-04T01:42:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"375f389d-6ed3-43af-90d4-e9453b293dbc","html_url":"https://github.com/lpeterse/haskell-hummingbird","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpeterse%2Fhaskell-hummingbird","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpeterse%2Fhaskell-hummingbird/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpeterse%2Fhaskell-hummingbird/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpeterse%2Fhaskell-hummingbird/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpeterse","download_url":"https://codeload.github.com/lpeterse/haskell-hummingbird/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199136,"owners_count":21063641,"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":["broker","haskell","mqtt","mqtt-broker"],"created_at":"2024-11-06T23:38:43.808Z","updated_at":"2025-04-10T10:31:24.741Z","avatar_url":"https://github.com/lpeterse.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"hummingbird MQTT broker [![Hackage](https://img.shields.io/github/release/lpeterse/haskell-hummingbird.svg)](https://github.com/lpeterse/haskell-hummingbird/releases) [![Travis](https://img.shields.io/travis/lpeterse/haskell-hummingbird.svg)](https://travis-ci.org/lpeterse/haskell-hummingbird)\n=======================\n\nThis is a multi-threaded MQTT broker (framework) written in Haskell.\n\nIt is based on the [Haskell MQTT](https://github.com/lpeterse/haskell-mqtt) library.\n\n## Batteries included\n\nThe package installs `hummingbird` which is already a full-fledged MQTT\nbroker with configuration files, logging, authentication etc.\n\nIf this is not sufficient for your use case you might also consider to\nassemble your own broker (i.e. with a custom authentication mechanism).\n\n## Quick Start\n\nDownload a [release](https://github.com/lpeterse/haskell-hummingbird/releases) and install it via\n\n``` sh\nsudo dpkg -i hummingbird_w.x.y.z-1_amd64.deb\n```\n\nYou now want to adapt `/etc/hummingbird/config.yml` to suit your needs.\nThe broker comes with no configured users, so you might want to use the following file as a starting point:\n`/usr/share/hummingbird/resources/principals/mqtt-default.yml` and copy the new user file to `/etc/hummingbird/principals/`.\n``` sh\ncp /usr/share/hummingbird/resources/principals/mqtt-default.yml /etc/hummingbird/principals/\n```\n\nTo generate a bcrypt encrypted password salt+hash pair, you can use a subcommand of hummingbird\n``` sh\nhummingbird pwhash\n```\n\nAll `*.yml` files in `principals` and its subfolders will be read by the broker.\n\nEvery change in configuration or authentication needs a restart of this feature\n``` sh\nsudo hummingbird cli --interactive=false --command=\"config reload\"\nsudo hummingbird cli --interactive=false --command=\"auth restart\"\n```\n\nIf you don't want to use `sudo`, the executing user has to be in the `hummingbird` group.\n\n## Customized brokers\n\nThe package exports modules which make it easy to compile a custom\nbroker executable. Look into the `hummingbird` implemention for getting\nstarted!\n\n## Creating a self-signed certificate for client authentication\n\nThe following script creates a 2048 bit RSA keypair and a self-signed\ncertificate to be used by the client for authentication.\n\nThe server only needs to know the public key. It will accept any certificate\nsigned with the corresponding private key and doesn't use any other information\nfrom the certificate.\n\n```bash\n#!/bin/bash\n\nset -e\n\nopenssl genrsa -out private.pem 2048\nopenssl rsa -in private.pem -outform PEM -pubout -out public.pem\nopenssl req -new -sha256 -key private.pem -out csr.csr -subj \"/CN=$1\"\nopenssl req -x509 -sha256 -days 3650 -key private.pem -in csr.csr -out certificate.pem\nopenssl x509 -text -in certificate.pem\n```\n\n## Using a self-signed certificate with `mosquitto_pub`\n\n```bash\nmosquitto_pub  -h localhost -p 8883 -V mqttv311 \\\n  --cafile \"resources/hummingbird_ca.crt\" \\\n  --cert \"resources/mqtt-default.crt\" \\\n  --key \"resources/mqtt-default.key\" \\\n  -t \"abc/def\" \\\n  -m \"asdasd\"\n```\n\nIf a username is not explicitly given, the broker will use the attribute `Subject: CN =` from the\nsupplied certificate. An explicitly set username will override the one from the certificate.\n\n## License\n\nPermission is hereby granted under the terms of the MIT license:\n\n\u003e Copyright (c) 2016 Lars Petersen\n\u003e\n\u003e Permission is hereby granted, free of charge, to any person obtaining\n\u003e a copy of this software and associated documentation files (the\n\u003e \"Software\"), to deal in the Software without restriction, including\n\u003e without limitation the rights to use, copy, modify, merge, publish,\n\u003e distribute, sublicense, and/or sell copies of the Software, and to\n\u003e permit persons to whom the Software is furnished to do so, subject to\n\u003e the following conditions:\n\u003e\n\u003e The above copyright notice and this permission notice shall be included\n\u003e in all copies or substantial portions of the Software.\n\u003e\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n\u003e EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\u003e MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n\u003e IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n\u003e CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n\u003e TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n\u003e SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpeterse%2Fhaskell-hummingbird","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpeterse%2Fhaskell-hummingbird","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpeterse%2Fhaskell-hummingbird/lists"}