Skip to Main Content

Experience AutoMQ for Kafka

After completing the environment setup and initialization, this article demonstrates how to quickly create a Kafka instance and experience message sending and receiving.

In this article, references to AutoMQ Product Service Provider, AutoMQ Service Provider, and AutoMQ specifically refer to AutoMQ HK Limited.

Prerequisites

Before creating a Kafka instance, ensure you have met the prerequisites and completed the environment installation. If not, follow the steps here:

Creating an Instance

To experience AutoMQ for Kafka, you need to create an instance first. Each instance corresponds to an open-source Apache Kafka cluster. Users can create instances through the front-end interface of the environment console, while the backend of the console will create the underlying cloud resources and complete the software deployment of the instance on behalf of the user.

The steps are as follows:

  1. Access the environment console URL and enter the environment console.

  2. Enter the environment console, click on the left navigation bar, and navigate to the instance list.

  3. Click the "Create New Instance" button and select parameters according to the following specifications.

Parameter
Value Description
Instance Name
  • Description: The instance name is an alias used to distinguish between instances. User-defined input.
  • Limitations: Refer to Restrictions▸ .
Instance Notes
  • Description: Instance notes are custom descriptions used to distinguish the usage of instances, generally inputting business scenarios. User-defined input.
  • Limitations: Refer to Restrictions▸ .
Availability Zone Information
  • Description: AutoMQ for Kafka instances currently support single-zone and three-zone deployment. Choose the appropriate type based on your business characteristics.
  • Options:
    • Single Availability Zone: All nodes of the Kafka cluster are deployed within the user-specified single availability zone.
    • Three Availability Zones: All nodes of the Kafka cluster are evenly distributed across the user-specified three availability zones.
Subnet Information
  • Description: AutoMQ for Kafka currently only supports setting one subnet within each availability zone. For multi-availability zone and subnet requirements, please Obtaining Services▸ .
  • Selection: The subnet provided by the user should contain a sufficient number of available IPs (at least 100 recommended) to prevent the risk of instance expansion failure due to insufficient IPs in the future.
Computing Specifications
  • Description: Computing specifications represent the message sending and receiving throughput capacity of the current AutoMQ Kafka instance. Refer to the product billing instructions and evaluate based on the number of AKUs. For details, refer to Billing Instructions for BYOC▸ .
  • Limitations: The AKU limit for creating instances is restricted by the version. For details, refer to Restrictions▸ .
Storage Specifications
  • Description: AutoMQ Kafka uses object storage as the message storage medium. Therefore, there is no need to pre-allocate storage capacity. Usage is based on the actual message volume, with on-demand usage and pay-as-you-go pricing.
  1. Click "Create Instance" and wait for the instance creation to complete.

Experience Sending and Receiving Messages

After the instance is created, you need to create a Topic before experiencing simple message sending and receiving. Follow these steps:

  1. Click "Instance Details" to enter the instance, then click the "Topic" navigation bar on the left.

  2. Click "New Topic," fill in the relevant parameters, and create the topic.

  1. Click the topic name to enter the topic details, then click the "Produce Message" tab.

  2. Fill in the test message content and click "Send" to complete the feature experience.

Next Steps

This quick start guide only demonstrates the basic process from environment creation to instance creation. AutoMQ Kafka is 100% compatible with Apache Kafka®, so for actual usage of AutoMQ Kafka, please refer to the relevant Apache Kafka documentation and knowledge base.

If there is no business need after the quick experience and testing, it is recommended to release the environment as soon as possible to avoid incurring costs from underlying cloud resource consumption.

Appendix: Cross-VPC Access to AutoMQ

AutoMQ instances provide VPC internal domain name resolution and private network addresses by default through PrivateDNS, serving only the current VPC. If an application needs to access AutoMQ across VPCs, you will need to configure the network yourself, meeting the following two conditions:

  • Condition 1: VPC Intercommunication: Users can connect the VPC where AutoMQ is located with the VPC where the application is located through methods such as VPC Peering, to access AutoMQ instances. Please refer to the cloud provider's VPC operation documents for configuring VPC Peering.

  • Condition 2: Private Zone Associated with Multiple VPCs: AutoMQ provides domain name resolution through Private Zone by default, which is limited to the current VPC. To resolve domain names across VPCs, the Private Zone used by AutoMQ needs to be additionally associated with the VPC where the application resides.

Private Zone Multiple VPCs Association Configuration Instructions

To configure a zone to associate with multiple VPCs in the AWS Route 53 product, refer to the following steps.

  1. Locate the Private Zone Id used by AutoMQ.

Copy the endpoint address of the AutoMQ console instance, remove the domain prefix to obtain the Private Zone, and then go to the Route53 Console to search for the Zone.

Enter the Zone details page to view the copied Hosted Zone Id.

  1. Scenario 1: Edit Hosted Zone and add the VPC of this account.
  1. Scenario 2: Add a cross-account VPC using AWS CLI.

If you need to add a cross-account VPC, it cannot be done through the console page; it must be completed through AWS CLI or SDK.

Assume that AutoMQ is deployed in account A's vpc-a, and it is necessary to associate account B's vpc-b to use AutoMQ. The specific steps are as follows:

Log in to AWS CLI using account A and create a DNS association authorization.


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

Parameter description:

  • hosted-zone-id: Fill in the Zone ID of the Zone used by AutoMQ under account A.

  • vpc: Enter the VPC information for account B; it must be encoded in the format “VPCRegion=XXXX,VPCId=XXXX”.

After pressing enter, detailed information will be displayed. Enter “:wq” to submit the command.

Log in to AWS CLI with 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 explanation:

  • hosted-zone-id: Fill in the Zone ID of the Zone used by AutoMQ under account A.

  • vpc: Fill in 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. Enter ":wq" to submit the command, then check the console where Account A is logged in to see the addition is completed.

Adding a new VPC to the Route 53 Zone takes 3-5 minutes to take effect. Once it is effective, you can resolve the domain name of AutoMQ within the application’s VPC.