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, and API.
Navigate to Products and select Databases.
Select the target database.
Navigate to Topics and Users to manage Quotas for Vultr Managed Apache Kafka®.
Click Add New Topic.
Provide values for Topic Name, Partition Count, Replication Factor, Retention Hours, and Retention Bytes. Click Add Topic.
List all the databases by sending a GET
request to the List Managed Databases endpoint and note the target database's ID.
$ curl "https://api.vultr.com/v2/databases" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a POST
request to the Create Database Topic endpoint to create a topic for your database.
$ 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
}'
Send a GET
request to the List Database Topics endpoint to list all the topics.
$ curl "https://api.vultr.com/v2/databases/<database-id>/topics" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"