Skip to main content
Once you have set up your environment, this guide walks you through creating a Kafka instance and sending and receiving your first messages.
In this document, product service provider, service provider and AutoMQ all refer to AutoMQ HK Limited.

Prerequisites

Before you can create a Kafka instance, you must complete the environment installation. If you have not done so, please follow this guide:

Create an Instance

To get started with AutoMQ, you first need to create an instance, which is equivalent to an open-source Apache Kafka cluster. You can create an instance using the web interface in the environment console. The console handles the provisioning of underlying cloud resources and the deployment of the instance software for you. Follow these steps:
  1. Navigate to your environment console’s URL to open the console.
  2. In the console, select Instances List from the left navigation panel.
  3. Click New Instance and configure the parameters as described below.
ParameterDescription
Instance Name
  • A user-defined alias to identify the instance.
  • For naming constraints, see Restrictions▸.
Instance Remark
  • A custom description for the instance’s purpose, such as the business scenario it serves.
  • For naming constraints, see Restrictions▸.
Availability Zone Information
  • AutoMQ instances support single-zone and three-zone deployments. Select the deployment type that best fits your business requirements.
  • Options:
    • Single-AZ: Deploys all Kafka cluster nodes in a single, user-specified availability zone.
    • Three-AZ: Distributes Kafka cluster nodes evenly across three user-specified availability zones.
Subnet Information
  • AutoMQ instances currently support one subnet per availability zone. For deployments requiring multiple subnets per availability zone, please contact us for support▸.
  • The selected subnet should have enough available IP addresses (at least 100 recommended) to accommodate future instance scaling and prevent expansion failures.
Compute Specification
  • This determines the message throughput (produce and consume) capacity of the AutoMQ instance. It is measured in AKUs (AutoMQ Kafka Units). For details, see Billing Instructions for BYOC▸.
  • The maximum number of AKUs is limited by your subscription plan. See Restrictions▸ for details.
Storage Specification
  • AutoMQ uses object storage for message data, so you don’t need to provision storage capacity in advance. You are billed for the actual storage used.
  1. Click Create Instance and wait for the instance to be created.

Send and receive messages

After your instance is created, you can create a topic to send and receive messages. Follow these steps:
  1. Click on the instance name to view its details, then select Topics from the left navigation panel.
  2. Click Create New Topic, fill in the required parameters, and create the topic.
  1. Click the topic name to view its details, then select the Produce Messages tab.
  2. Enter your test message content and click Send. You have successfully produced a message.

Next Steps

This quickstart covers the basic steps for creating an environment and an instance. Since AutoMQ is fully compatible with Apache Kafka, you can refer to the official Apache Kafka documentation for guidance on more advanced operations.
To avoid unnecessary charges, we recommend deleting the environment after you finish testing if you no longer need it.

Appendix: Accessing AutoMQ Across VPCs

By default, AutoMQ instances use PrivateDNS for domain name resolution, making them accessible only via private network addresses within the same VPC. To access an AutoMQ instance from a different VPC, you must configure your network to meet the following requirements:
  • Requirement 1: VPC Peering: Connect the AutoMQ VPC and the application VPC using VPC Peering or a similar network connection method. Refer to your cloud provider’s documentation for instructions on setting up VPC Peering.
  • Requirement 2: Shared Private Zone: By default, AutoMQ’s domain name resolution is handled by a Private Zone scoped to its own VPC. To enable cross-VPC resolution, you must associate this Private Zone with your application’s VPC.

Configure a Private Zone for multi-VPC access

  • AWS Route53
Follow these steps to associate a Route 53 private hosted zone with multiple VPCs.
  1. Find the Private Hosted Zone ID.
In the AutoMQ console, copy the instance’s access point address. The Private Zone is the domain name part of the address. Go to the Route 53 console and search for this zone.On the zone’s detail page, you will find the Hosted Zone ID.Edit hosted zone to add a VPC from the same account.
  1. Scenario 1: Associate a VPC from the same AWS account.
Use the AWS CLI to associate a VPC from a different account.
  1. Scenario 2: Associate a VPC from a different AWS account.
Associating a VPC from a different account cannot be done through the AWS console; you must use the AWS CLI or an SDK.For example, let’s say AutoMQ is in vpc-a (account A), and you want to associate it with vpc-b (account B). Follow these steps:In account A, authorize the VPC association.

aws route53 create-vpc-association-authorization --hosted-zone-id   XXXXX  --vpc VPCRegion=XXXX,VPCId=vpc-b

Parameter description:
  • hosted-zone-id: enter the Zone ID of the Zone used by AutoMQ in account A.
  • vpc: Provide the VPC information for account B, which must be encoded in the format “VPCRegion=XXXX,VPCId=XXXX”.
After pressing enter, detailed information will be output. Type “:wq” to submit the command.Log in to AWS CLI using account B, and create a DNS association request.

aws route53 associate-vpc-with-hosted-zone --hosted-zone-id  XXXX  --vpc VPCRegion=xxx,VPCId=vpc-b

Parameter description:
  • hosted-zone-id: Enter the Zone ID of the AutoMQ zone used by account A.
  • vpc: Fill in the VPC information for account B. It must be formatted as “VPCRegion=XXXX,VPCId=XXXX”.
After pressing enter, detailed information will be displayed. Enter “:wq” to submit the command, and you can view the console login for account A to confirm the addition has been completed.
Adding a new VPC to the Route 53 Zone requires 3-5 minutes to take effect. Once effective, the application’s VPC will be able to resolve the AutoMQ domain name.
I