How to Manage Topics for Vultr Managed Apache Kafka®

Updated on 02 July, 2025

Vultr Managed Apache Kafka® allows customers to create and manage topics within their Kafka database. Users can easily define topic configurations, including partitioning and replication settings, to suit their data streaming needs. This straightforward interface enables efficient organization of data streams, ensuring customers can scale their applications and optimize performance while maintaining control over their topics.

Follow this guide to manage Topics for Vultr Managed Apache Kafka® with Vultr Customer Portal, API, and CLI.

  • Vultr Customer Portal
  • Vultr API
  • Vultr CLI
  1. Navigate to Products and select Databases.

    Database selection products menu

  2. Select the target database.

    Selecting a target database

  3. Navigate to Topics and Users to manage Quotas for Vultr Managed Apache Kafka®.

    Selecting the topic and users window

  4. Click Add New Topic.

    Button to add new topic

  5. Provide values for Topic Name, Partition Count, Replication Factor, Retention Hours, and Retention Bytes. Click Add Topic.

    provide and values and create a topic

  1. List all the databases by sending a GET request to the List Managed Databases endpoint and note the target database's ID.

    console
    $ curl "https://api.vultr.com/v2/databases" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  2. Send a POST request to the Create Database Topic endpoint to create a topic for your database.

    console
    $ curl "https://api.vultr.com/v2/databases/<database-id>/topics" \
        -X POST \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        --data '{
            "name" : "some_new_topic",
            "partitions" : 3,
            "replication" : 3,
            "retention_hours" : 160,
            "retention_bytes" : -1
    }'
    
  3. Send a GET request to the List Database Topics endpoint to list all the topics.

    console
    $ curl "https://api.vultr.com/v2/databases/<database-id>/topics" \            
        -X GET \                                   
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  1. List all databases and note the target database's ID.

    console
    $ vultr-cli database list --summarize
    
  2. Create a database topic for the target database.

    console
    $  vultr-cli database topic create <database-id> --name <string> --partitions <int> --retention-bytes <int> --retention-hours <int>
    

    Run vultr-cli database topic create --help to understand and view all options.

  3. List and confirm the topic created.

    console
    $ vultr-cli database topic list <database-id>
    
  4. Delete a topic for the target database.

    console
    $ vultr-cli database topic delete <database-id> <topic-name>
    

Comments

No comments yet.