Deploying AutoMQ for production workloads and optimizing its parameters can be relatively complex. You can reach out to the AutoMQ team through this form for necessary assistance and best practices.
Prerequisites
This documentation example is intended to deploy a 5-node AutoMQ cluster, where 3 nodes run both the Controller and Broker, and the remaining 2 nodes run only the Broker. Ensure the following prerequisites:-
Five Linux hosts, preferably network-optimized virtual machines with 4 CPUs and 16GB of RAM, for deploying the AutoMQ cluster. Make sure the system disk storage space is at least 20GB, and data volume disk space is no less than 20GB (required only for deploying Controller nodes). An example is as follows:
Role IP Node ID System Volume Metadata Volume Controller + Broker 192.168.0.1 0 EBS 20GB EBS 20GB Controller + Broker 192.168.0.2 1 EBS 20GB EBS 20GB Controller + Broker 192.168.0.3 2 EBS 20GB EBS 20GB Broker 192.168.0.4 1000 EBS 20GB Not applicable Broker 192.168.0.5 1001 EBS 20GB Not applicable - Download the binary installation package to set up AutoMQ. Refer to Software Artifact▸.
- Create two custom-named object storage buckets, such as automq-data and automq-ops, as used in this document.
- Create an IAM user and generate an Access Key ID and Access Key Secret for it. Then, ensure that the IAM user has full read and write permissions to the previously created object storage bucket.
- Install jemalloc to optimize memory allocation. Refer to Getting-started.
AutoMQ relies on the Kafka KRaft component for maintaining cluster metadata; therefore, in production scenarios, each cluster requires the deployment of at least 3 nodes (running both Controller and Broker).
Install and Launch the AutoMQ Cluster
Step 1: Create a Cluster Deployment Project
AutoMQ provides theautomq-cli.sh
tool for managing AutoMQ clusters. By using the command automq-cli.sh cluster create [project]
, a cluster configuration template will be automatically created in the directory clusters/[project]/topo.yaml
.
Step 2: Edit the Cluster Configuration Template
Edit the configuration template generated in Step 1 during cluster creation. An example of the configuration template is as follows:-
global.clusterId
: A randomly generated unique ID, which does not require modification. -
global.config
: This is the custom incremental configuration for all nodes within the cluster. You need to specify actual values fors3.data.buckets
,s3.ops.buckets
, ands3.wal.path
. Additional configuration items can be added with line breaks. For details on configuring object storage parameters for different cloud providers, please refer to Object Storage Configuration▸. -
global.envs
: These are the environment variables for the node. ReplaceKAFKA_S3_ACCESS_KEY
andKAFKA_S3_SECRET_KEY
with actual values. -
controllers
: This is a list of Controller nodes that must be updated with actual values. -
brokers
: This is a list of Broker nodes that also need to be updated with actual values.
Step 3: Start AutoMQ
Execute the cluster pre-check command to generate the final startup command.Test Message Sending and Receiving
After installing and starting the AutoMQ cluster, you can test message sending, consumption, and other functionalities by executing the Kafka CLI commands available in the bin directory of the installation package.- Execute the following command to run kafka-topics.sh and create a Topic.
- Execute the following command to run kafka-console-producer.sh and send test messages.
- Execute the following command to run kafka-console-consumer.sh and consume test messages.
Stop and Uninstall the AutoMQ Cluster.
After completing the tests, you can refer to the following steps to stop and uninstall the AutoMQ cluster.- Run the following command on each node to terminate the process.
-
You can automatically clear data in
s3-data-bucket
ands3-ops-bucket
by setting lifecycle rules for object storage, and then remove these buckets. - Delete the created compute instances along with their respective system volumes and data volumes.
- Remove the IAM user set up for testing along with its Access Key ID and Access Key Secret.
Table Topic is a core feature designed by AutoMQ for modern data lake architectures, aiming to seamlessly integrate streaming data with static data lakes. It addresses issues such as traditional stream-batch separation, complex ETL processes, and high costs through architectural innovation. For instructions on enabling Table Topic in the cluster, please refer to Overview▸.