Introduction
Configuration
Language Support
AMQP 0-9-1 Overview
More Exchange Types
More Consumer Features
Queue Deep-dive
Other Features
Reliable Message Delivery
High Availability
Monitoring
Management HTTP API
Tutorials
Networking
LavinMQ CLI
LavinMQ installation guide
Supported platforms for LavinMQ include most Linux distributions, macOS, and Docker.
Latest stable version: v2.3.0
Check out the changelog for an overview of releases.
Installing LavinMQ on Debian/Ubuntu
Installation in Debian/Ubuntu is a one-step process using the package manager. LavinMQ releases are hosted in packagecloud.
curl -fsSL https://packagecloud.io/cloudamqp/lavinmq/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/lavinmq.gpg > /dev/null
. /etc/os-release
echo "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
sudo apt-get update
sudo apt-get install lavinmq
Install LavinMQ on macOS
macOS users can install LavinMQ with brew:
brew update
brew install cloudamqp/cloudamqp/lavinmq
Installing LavinMQ on Fedora
To install LavinMQ on Fedora systems, use the following commands:
sudo tee /etc/yum.repos.d/lavinmq.repo << 'EOF'
[lavinmq]
name=LavinMQ
baseurl=https://packagecloud.io/cloudamqp/lavinmq/fedora/$releasever/$basearch
gpgkey=https://packagecloud.io/cloudamqp/lavinmq/gpgkey
repo_gpgcheck=1
gpgcheck=0
EOF
sudo dnf install lavinmq
Running LavinMQ with Docker
You can run LavinMQ using Docker. Images are available on Docker Hub at cloudamqp/lavinmq
Fetch and run the latest version with:
docker run --rm -it -p 5672:5672 -p 15672:15672 -v /tmp/amqp:/var/lib/lavinmq cloudamqp/lavinmq
Docker Compose
Here’s a minimal example of how to run LavinMQ with Docker Compose:
services:
lavinmq:
image: "cloudamqp/lavinmq:latest"
ports:
- 15672:15672 # HTTP
- 5672:5672 # AMQP
Start the container by running:
docker compose up
You can now start publishing and consuming messages at amqp://guest:guest@localhost
, and access the management UI by visiting http://localhost:15672
Visit cloudamqp/lavinmq on Docker Hub to learn more.
How to build LavinMQ from Source
LavinMQ is written in the Crystal programming language. To build LavinMQ you must first install Crystal. This can be done for a number of platforms by following the instructions on the Crystal site.
Once Crystal is installed you can clone the repo from GitHub and build it with:
git clone git@github.com:cloudamqp/lavinmq.git
cd lavinmq
make
sudo make install
Now, LavinMQ is ready to be used. You can check the version with:
lavinmq -v
# v2.3.0
Hosted solutions
Don’t want to run LavinMQ yourself? CloudAMQP offers hosted LavinMQ clusters
Upgrading LavinMQ
Upgrading LavinMQ is generally a simple, safe and quick operation.
Debian/Ubuntu
sudo apt update
sudo apt install lavinmq
OS X / brew
brew update
brew upgrade cloudamqp/cloudamqp/lavinmq
Docker
docker-compose pull
docker-compose up -d
Running and Configuring LavinMQ
LavinMQ only requires one argument: a path to a data directory.
lavinmq -D /var/lib/lavinmq
The ports needed for LavinMQ are 5671 (amqp with TLS), 5672 (amqp), and 15672 (management interface).
The default user for LavinMQ has the username guest
with a password set to
guest
. This user can be deleted using the
lavinmqctl CLI or by using the management interface.
Additional users can be added in the same way.
More configuration options can be viewed with -h
, and you can specify a configuration file too. See the configuration files documentation for more details (/etc/lavinmq/lavinmq.ini
for Debian/Ubuntu machines).
Running LavinMQ as a service
In many cases, such as on Debian/Ubuntu, LavinMQ will be running as a service after it has been installed.
Stopping/starting/restarting can be done by using the service command:
sudo service lavinmq restart
Ready to take the next steps? Here are some things you should keep in mind:
Managed LavinMQ instance on CloudAMQP
LavinMQ has been built with performance and ease of use in mind - we've benchmarked a throughput of about 1,000,000 messages/sec. You can try LavinMQ without any installation hassle by creating a free instance on CloudAMQP. Signing up is a breeze.
Help and feedback
We welcome your feedback and are eager to address any questions you may have about this piece or using LavinMQ. Join our Slack channel to connect with us directly. You can also find LavinMQ on GitHub.