Skip to contentManaged Kafka is live: Apache Kafka on AWS for half the cost of MSK

Kafka clusters

Change Kafka topic retention

POST/kafka-clusters/{uuid}/topics/{topic}/retention

Sets a topic's retention.ms. Potentially destructive: Kafka deletes messages older than the new retention, and on Artie-managed topics that can drop change events before Artie pipelines read them. Kafka-internal (__) topics can't change. On a Managed Kafka cluster Cruise Control's (strimzi.cruisecontrol.*) can't either, and the cluster must be active (409 otherwise).

Authorizations

  • Authorizationstringheaderrequired

    API key passed as a Bearer token in the Authorization header.

Request

curl --request POST \
  --url https://api.artie.com/kafka-clusters/{uuid}/topics/{topic}/retention \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "retentionMS": 123
}'

Path parameters

  • topicstringrequired
  • uuidstringrequired

Body

application/json

  • retentionMSintegerrequired

    New retention.ms: at least 86400000 (one day), or -1 to keep messages forever.

Responses

204No Content

400Bad Request

404Not Found

409Conflict

500Internal Server Error

502Bad Gateway

Was this page helpful?