0

I have been trying to edit the retention.ms parameter for a kafka topic through a PUT method as follows:

curl -X PUT -H "Content-Type: application/json" --data '{"configs":{"retention.ms":"10000"}}'  http://localhost:8082/topics/t0/

However, apparently such a change isn't allowed and a 405 error is returned.

{"error_code":405,"message":"HTTP 405 Method Not Allowed"}

The response to a get request at the same uri is:

{
"name": "t0",
"configs": {
"compression.type": "producer",
"leader.replication.throttled.replicas": "",
"message.downconversion.enable": "true",
"min.insync.replicas": "1",
"segment.jitter.ms": "0",
"cleanup.policy": "delete",
"flush.ms": "9223372036854775807",
"follower.replication.throttled.replicas": "",
"segment.bytes": "1073741824",
"retention.ms": "604800000",
"flush.messages": "9223372036854775807",
"message.format.version": "3.0-IV1",
"max.compaction.lag.ms": "9223372036854775807",
"file.delete.delay.ms": "60000",
"max.message.bytes": "1048588",
"min.compaction.lag.ms": "0",
"message.timestamp.type": "CreateTime",
"preallocate": "false",
"min.cleanable.dirty.ratio": "0.5",
"index.interval.bytes": "4096",
"unclean.leader.election.enable": "false",
"retention.bytes": "-1",
"delete.retention.ms": "86400000",
"segment.ms": "604800000",
"message.timestamp.difference.max.ms": "9223372036854775807",
"segment.index.bytes": "10485760"
},
"partitions": [
{
"partition": 0,
"leader": 101,
"replicas": [
{
"broker": 101,
"leader": true,
"in_sync": true
}
]
}
]
}

Is there some alternative way to change the parameters of the topic configuration?

0 Answers0