{"id":13646266,"url":"https://github.com/cloudamqp/lavinmq","last_synced_at":"2026-02-06T13:25:40.403Z","repository":{"id":38255564,"uuid":"90196632","full_name":"cloudamqp/lavinmq","owner":"cloudamqp","description":"Ultra quick message queue and streaming server","archived":false,"fork":false,"pushed_at":"2025-05-06T12:30:42.000Z","size":7476,"stargazers_count":694,"open_issues_count":69,"forks_count":39,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-05-06T12:47:16.009Z","etag":null,"topics":["amqp","background-jobs","job-queue","message-broker","message-queue","mqtt","persistent-logs","server","streaming"],"latest_commit_sha":null,"homepage":"https://lavinmq.com","language":"Crystal","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/cloudamqp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-05-03T21:53:50.000Z","updated_at":"2025-05-06T08:12:19.000Z","dependencies_parsed_at":"2023-10-03T14:12:01.421Z","dependency_job_id":"527cb532-e0af-460b-95e8-a7fe13c32596","html_url":"https://github.com/cloudamqp/lavinmq","commit_stats":{"total_commits":4530,"total_committers":31,"mean_commits":146.1290322580645,"dds":0.5618101545253863,"last_synced_commit":"14530f9c54bb0be3938d8c7f9265aa720732e148"},"previous_names":[],"tags_count":177,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudamqp%2Flavinmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudamqp%2Flavinmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudamqp%2Flavinmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudamqp%2Flavinmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudamqp","download_url":"https://codeload.github.com/cloudamqp/lavinmq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292042,"owners_count":22046426,"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":["amqp","background-jobs","job-queue","message-broker","message-queue","mqtt","persistent-logs","server","streaming"],"created_at":"2024-08-02T01:02:51.762Z","updated_at":"2026-02-06T13:25:40.388Z","avatar_url":"https://github.com/cloudamqp.png","language":"Crystal","readme":"[![Build Status](https://github.com/cloudamqp/lavinmq/workflows/CI/badge.svg)](https://github.com/cloudamqp/lavinmq/actions)\n[![Build Status](https://api.cirrus-ci.com/github/cloudamqp/lavinmq.svg)](https://cirrus-ci.com/github/cloudamqp/lavinmq)\n[![License](https://img.shields.io/github/license/cloudamqp/lavinmq)](https://github.com/cloudamqp/lavinmq/blob/master/LICENSE)\n[![GitHub release](https://img.shields.io/github/v/release/cloudamqp/lavinmq)](https://github.com/cloudamqp/lavinmq/releases)\n\n# ![LavinMQ](static/img/banner-lavinmq.svg)\n\nLavinMQ is a high-performance message queue \u0026 streaming server implementing the AMQP 0-9-1 and MQTT 3.1.0, 3.1.1 protocols.\nBuilt with [Crystal](https://crystal-lang.org/) for optimal efficiency.\n\n\u003cimg src=\"static/img/lavinmq-ui.png\" alt=\"LavinMQ GUI\" height=\"500\"\u003e\n\n- **Lightning Fast**: Exceptional throughput performance\n- **Resource Efficient**: Minimal RAM requirements\n- **Highly Scalable**: Handles very long queues and numerous connections\n- **Simple Setup**: Requires minimal configuration to get started\n\nDiscover more at [LavinMQ.com](https://lavinmq.com)\n\n## Installation\n\nSee [Installation guide](https://lavinmq.com/documentation/installation-guide) for more information on installing LavinMQ. See the [LavinMQ Operator](https://github.com/cloudamqp/lavinmq-operator) for instructions on running the Kubernetes operator.\n\n### Debian/Ubuntu\n\n```sh\ncurl -fsSL https://packagecloud.io/cloudamqp/lavinmq/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/lavinmq.gpg \u003e /dev/null\n. /etc/os-release\necho \"deb [signed-by=/usr/share/keyrings/lavinmq.gpg] https://packagecloud.io/cloudamqp/lavinmq/$ID $VERSION_CODENAME main\" | sudo tee /etc/apt/sources.list.d/lavinmq.list\nsudo apt-get update\nsudo apt-get install lavinmq\n```\n\n### Fedora\n\n```sh\nsudo tee /etc/yum.repos.d/lavinmq.repo \u003c\u003c 'EOF'\n[lavinmq]\nname=LavinMQ\nbaseurl=https://packagecloud.io/cloudamqp/lavinmq/fedora/$releasever/$basearch\ngpgkey=https://packagecloud.io/cloudamqp/lavinmq/gpgkey\nrepo_gpgcheck=1\ngpgcheck=0\nEOF\nsudo dnf install lavinmq\n```\n\n### Arch Linux\n\nThe package is available on [AUR](https://aur.archlinux.org/packages/lavinmq),\nit depends on `gc-large-config` (that conflicts with `gc` package package), it\nis the very same gc package found in Arch Linux but compiled with\n`--enable-large-config`.\n\nThen use systemctl to start/stop/enable/disable it, e.g. `systemctl start lavinmq`.\n\n### macOS\n\nYou can install LavinMQ from [Homebrew](https://brew.sh/) with `brew`:\n\n```sh\nbrew install cloudamqp/cloudamqp/lavinmq\n```\n\n### Docker\n\nDocker images are published to [Docker Hub](https://hub.docker.com/r/cloudamqp/lavinmq).\nFetch and run the latest version with:\n\n```sh\ndocker run --rm -it -p 5672:5672 -p 15672:15672 -v /tmp/amqp:/var/lib/lavinmq cloudamqp/lavinmq\n```\n\n#### Docker Compose\n\nMinimal example on how to run LavinMQ with Docker compose.\n\n```yaml\nservices:\n  lavinmq:\n    image: \"cloudamqp/lavinmq:latest\"\n    ports:\n      - 15672:15672 # HTTP\n      - 5672:5672 # AMQP\n```\n\nStart the container by running `docker compose up`\n\nFor an example on setting up a multi-node LavinMQ cluster with Docker Compose, see [Setting up a LavinMQ cluster with Docker Compose](https://lavinmq.com/documentation/docker-compose-cluster)\n\n### Windows\n\nFor running LavinMQ on Windows, we recommend using WSL (Windows Subsystem for Linux). Install your preferred Linux distribution through WSL, then follow the installation instructions for that distribution above.\n\n### From Source\n\nBegin with installing Crystal. Refer to\n[Crystal's installation documentation](https://crystal-lang.org/install/)\non how to install Crystal.\n\nClone the git repository and build the project.\n\n```sh\ngit clone git@github.com:cloudamqp/lavinmq.git\ncd lavinmq\nmake\nsudo make install # optional\n```\n\n## Using LavinMQ\n\n### Getting Started\n\nFor a quick start guide on using LavinMQ, see the [getting started documentation](https://lavinmq.com/documentation/getting-started).\n\n### Running LavinMQ\n\nLavinMQ only requires one argument: a path to a data directory.\n\n```sh\nlavinmq -D /var/lib/lavinmq\n```\n\nMore configuration options can be viewed with `-h`,\nand you can specify a configuration file too, see [extras/lavinmq.ini](extras/lavinmq.ini)\nfor an example, or see the section on [config files in the documentation](https://lavinmq.com/documentation/configuration-files).\n\n### Client Libraries\n\nAll AMQP client libraries work with LavinMQ, and there are AMQP client libraries for almost every platform. The LavinMQ website has guides for many common platforms:\n\n- [Ruby](https://lavinmq.com/documentation/ruby-sample-code)\n- [Node.js](https://lavinmq.com/documentation/nodejs-sample-code)\n- [Java](https://lavinmq.com/documentation/java-sample-code)\n- [Python](https://lavinmq.com/documentation/python-sample-code)\n- [PHP](https://lavinmq.com/documentation/php-sample-code)\n- [Crystal](https://lavinmq.com/documentation/crystal-sample-code)\n- [Go](https://lavinmq.com/documentation/go-sample-code)\n- [.NET](https://lavinmq.com/documentation/dot-net-sample-code)\n\n## Performance\n\nLavinMQ delivers exceptional throughput performance on commodity hardware. On a single c8g.large EC2 instance with GP3 EBS storage (XFS formatted), LavinMQ achieves:\n\n**Throughput Benchmarks:**\n\n- **800,000 msgs/s** - End-to-end throughput (16-byte messages, single queue, single producer/consumer)\n- **1,600,000 msgs/s** - Producer-only performance\n- **1,200,000 msgs/s** - Consumer-only performance (auto-ack)\n\n**Memory Efficiency:**\n\n- **25 MB RAM** - For 100 million enqueued messages\n- **45 MB RAM** - For 1,000 declared queues\n- **70 MB RAM** - For 1,000 concurrent connections\n\n**Binding Performance:**\n\n- **1,600 bindings/s** - Non-durable queues\n- **1,000 bindings/s** - Durable queues\n\nUse [lavinmqperf](https://lavinmq.com/documentation/lavinmqperf) to benchmark your own setup, or review detailed performance data at [lavinmq-benchmark](https://github.com/cloudamqp/lavinmq-benchmark/blob/main/results/lavinmq_throughput.md) on GitHub.\n\n## Features\n\n### Core Protocols\n\n- AMQP 0-9-1 protocol support\n- MQTT 3.1.0 protocol support\n- MQTT 3.1.1 protocol support\n- AMQPS (TLS)\n- AMQP over websockets\n- MQTT over websockets\n\n### Messaging Capabilities\n\n- Publisher confirm\n- Transactions\n- Dead-lettering\n- TTL support on queue, message, and policy level\n- CC/BCC\n- Alternative exchange\n- Exchange to exchange bindings\n- Direct-reply-to RPC\n- Queue max-length\n- Priority queues\n- Delayed exchanges\n- Message deduplication\n\n### Management\n\n- HTTP API\n- Users and ACL rules\n- VHost separation\n- Policies\n- Importing/export definitions\n- Consumer cancellation\n\n### High Availability\n\n- Replication\n- Automatic leader election in clusters via etcd\n\n### Other Functionality\n\n- Shovels\n- Queue \u0026 Exchange federation\n- Single active consumer\n- Stream queues\n\n## Feature Highlights\n\n### Clustering\n\nLavinMQ can be fully clustered with multiple other LavinMQ nodes. One node is always the leader and the others stream all changes in real-time. Failover happens instantly when the leader is unavailable.\n\n[etcd](https://etcd.io/) is used for leader election and maintaining the In-Sync-Replica (ISR) set. LavinMQ then uses a custom replication protocol between the nodes. When a follower disconnects it will fall out of the ISR set, and will then not be eligible to be a new leader.\n\nSee [Setting up Clustering with LavinMQ](https://lavinmq.com/documentation/clustering) for more information on Clustering in LavinMQ.\n\n#### Clustering Configuration\n\nEnable clustering with the following config:\n\n```ini\n[clustering]\nenabled = true\nbind = ::\nport = 5679\nadvertised_uri = tcp://my-ip:5679\netcd_endpoints = localhost:2379\n```\n\nor start LavinMQ with:\n\n```sh\nlavinmq --data-dir /var/lib/lavinmq --clustering --clustering-bind :: --clustering-advertised-uri=tcp://my-ip:5679\n```\n\n### Stream Queues\n\nStream queues provide an append-only log structure that allows multiple consumers to read the same messages independently. Unlike standard queues, messages in stream queues aren't deleted when consumed, making them ideal for event sourcing patterns and multi-consumer scenarios.\n\nEach consumer can start reading from anywhere in the queue using the `x-stream-offset` consumer argument and can process messages at their own pace. See [Stream Queues](https://lavinmq.com/documentation/streams) in the documentation for more information on using Stream Queues.\n\n#### Stream Queue Filtering\n\nStream queues support message filtering, allowing consumers to receive only messages that match specific criteria. This is useful for consuming a subset of messages without creating multiple queues. For more information on filtering, see the [documentation](https://lavinmq.com/documentation/streams#stream-filtering).\n\n### MQTT Support\n\nLavinMQ natively supports the MQTT 3.1.0 and 3.1.1 protocol, facilitating seamless integration with IoT devices, sensors, and mobile applications. Each MQTT session is backed by an AMQP queue, ensuring consistent and reliable message storage. Messages within these sessions are persistently stored on disk.\n\nFor retained messages, LavinMQ maintains a dedicated storage system that maps topics to their respective retained messages. These retained messages are also persistently stored, ensuring that new subscribers immediately receive the latest retained message upon subscribing, including those using wildcard topic filters. In a clustered environments, the retained message store is replicated across nodes.\n\nPlease note that Quality of Service (QoS) level 2 is not supported in LavinMQ; messages published with QoS 2 will be downgraded to QoS 1.\n\nSee [MQTT in LavinMQ](https://lavinmq.com/documentation/mqtt-in-lavinmq) for more information on using MQTT.\n\n#### MQTT Configuration\n\n```ini\n[MQTT]\nbind = \"127.0.0.1\"\nport = 1883\ntls_port = 8883\nunix_path = \"\"\nmax_inflight_messages = 65535\ndefault_vhost = \"/\"\n```\n\n## Implementation Details\n\nLavinMQ is built in Crystal and uses a disk-first approach to message storage, letting the OS handle caching. For full details on implementation, storage architecture, and message flows, see the [Implementation details section in CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Compatibility Notes\n\nThere are a few edge-cases that are handled a bit differently in LavinMQ compared to other AMQP servers:\n\n- When comparing queue/exchange/binding arguments all number types (e.g. 10 and 10.0) are considered equivalent\n- When comparing queue/exchange/binding arguments non-effective parameters are also considered, and not ignored\n- TTL of queues and messages are accurate to 0.1 second, not to the millisecond\n- Newlines are not removed from Queue or Exchange names, they are forbidden\n\n## Getting Help\n\nFor questions or suggestions:\n\n- Join our [Slack community](https://join.slack.com/t/lavinmq/shared_invite/zt-1v28sxova-wOyhOvDEKYVQMQpLePNUrg)\n- Use the [lavinmq tag](https://stackoverflow.com/questions/tagged/lavinmq) on Stack Overflow\n- Want to learn more? [Talk with our product experts](https://webforms.pipedrive.com/f/64JnLsqIMAdF2BDQ06ioKLhC2NuNmkwNplNhRxtIqlm0nFnuIeX97eb7fZKej0vFHZ)\n\n## Hosted Solutions\n\n[CloudAMQP](https://www.cloudamqp.com/plans.html#lmq) offers a hosted LavinMQ solution with 24/7 support.\n\nFor assistance with a CloudAMQP-hosted LavinMQ instance, contact [support@cloudamqp.com](mailto:support@cloudamqp.com).\n\n## Contributing\n\nPlease read our [contributing guide](CONTRIBUTING.md) if you'd like to help improve LavinMQ.\n\n## License\n\nThe software is licensed under the [Apache License 2.0](LICENSE).\n\nCopyright 2018-2025 84codes AB\n\nLavinMQ is a trademark of 84codes AB\n","funding_links":[],"categories":["Crystal","Projects"],"sub_categories":["Message Broker"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudamqp%2Flavinmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudamqp%2Flavinmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudamqp%2Flavinmq/lists"}