공부방/Kafka
Kafka config 구분 및 이해
daram
2023. 5. 13. 19:14
Kafka-configs 사용하기
broker에 있는 모든 컨피그를 확인해봅시다.
broker의 name은 0이 default 값이기 때문에 아래와 같이 설정해주었습니다.
kafka-configs --bootstrap-server localhost:9092 --entity-type brokers --entity-name 0 --all --describe
topic에 있는 모든 컨피그를 확인해봅시다.
kafka-configs --bootstrap-server localhost:9092 --entity-type topics --entity-name multipart-topic --all --describe
topic에 있는 컨피그에서 max.message.bytes 값을 확인해봅시다.
kafka-configs --bootstrap-server localhost:9092 --entity-type topics --entity-name multipart-topic --all --describe | grep message.bytes
이 값을 변경해 보려고합니다.
max.message.bytes 값ㅇ르 2088000으로 변경해 봅시다.
kafka-configs --bootstrap-server localhost:9092 --entity-type topics --entity-name multipart-topic --alter --add-config max.message.bytes=2088000
특정 토픽의 parameter 값을 원상 복구 시킬때는 아래와 같이 하면 됩니다.
kafka-configs --bootstrap-server localhost:9092 --entity-type topics --entity-name multipart-topic --alter --delete-config max.message.bytes