How to Reconfigure Kafka Database Clusters

Kafka is an open-source distributed event and stream-processing platform built to process demanding real-time data feeds. It is inherently scalable, with high throughput and availability.

You can update your database engine’s parameters with the API, such as compression_type and group_min_session_timeout_ms. For a full list of the parameters you can edit, see our API reference. Under the REQUEST BODY SCHEMA section, click config, and then click the kafka option.

To ensure database stability, you can only edit the parameters listed in our API reference. To change other Kafka parameters, contact support.

Update a Database’s Configuration Using the API

How to update a database's configuration using the DigitalOcean API

To update a database's configuration using the DigitalOcean API, follow these steps:

  1. Create a personal access token, and save it for use with the API.

  2. Send a PATCH request to{database_cluster_uuid}/config


    To update a database's configuration with cURL, call:

                    curl -X PATCH \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
      -d '{"config": {"sql_mode": "ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES","sql_require_primary_key": true}}' \


                    import os
    from pydo import Client
    client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
    resp = client.databases.patch_config(database_cluster_uuid="a7aba9d")