926 words
5 minutes
[kafka]Server Properties

Server Properties#

Terminal window
############################# Server Basics #############################
# The id of the broker. This must be set to a unique integer for each broker.
broker.id=0 # 실행할 카프카 브로커의 ID
############################# Socket Server Settings #############################
# The address the socket server listens on. If not configured, the host name will be equal to the value of
# java.net.InetAddress.getCanonicalHostName(), with PLAINTEXT listener name, and port 9092.
# FORMAT:
# listeners = listener_name://host_name:port
# EXAMPLE:
# listeners = PLAINTEXT://your.host.name:9092
# ----------------------------------------
# 카프카 브로커가 클라이언트 요청을 수신하는 주소
# 프로토콜, 호스트, 포트를 지정
# 따로 설정하지 않을 경우, 호스트 이름은 java.net.InetAddress.getCanonicalHostName()의 값과 같음
listeners=PLAINTEXT://:9092
# ----------------------------------------
# ----------------------------------------
# kafka CLI 툴에서 접속 시 사용하는 IP 및 포트 정보
advertised.listeners=PLAINTEXT://your.host.name:9092
# ----------------------------------------
# ----------------------------------------
# SASL_SSL, SASL_PLAINTEXT, SSL, PLAINTEXT 보안 설정시 프로토콜 매핑
# listener.security.protocol.map=PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
# ----------------------------------------
# ----------------------------------------
# 네트워크 처리를 위한 스레드 수
# num.network.threads=3
# ----------------------------------------
# ----------------------------------------
# 브로커 내부의 I/O 처리를 위한 스레드 수
# num.io.threads=8
# ----------------------------------------
############################# Log Basics #############################
# ----------------------------------------
# 통신을 통해 받은 메시지를 저장하는 디렉토리
# 미리 mkdir 명령어로 디렉토리를 생성해야 함
# log.dirs=/tmp/kafka-logs
# ----------------------------------------
# ----------------------------------------
# 파티션 개수를 명시하지 않고 토픽을 생성시 기본 설정되는 파티션 개수
num.partitions=1
# ----------------------------------------
# ----------------------------------------
# segment 단일 로그파일 최대 크기
# log.segment.bytes=1073741824
# ----------------------------------------
############################# Log Retention Policy #############################
# log retention : 로그 보관 정책. 로그를 어느 시점 까지 보관할지 설정
# ----------------------------------------
# 로그 파일이 삭제되기 까지의 시간
log.retention.hours=168
# ----------------------------------------
# ----------------------------------------
# 로그 파일의 총 용량을 제한
# default : -1 (지우지 않는다)
#log.retention.bytes=1073741824
# ----------------------------------------
# ----------------------------------------
# 로그를 삭제하기 위해 체크하는 주기
log.retention.check.interval.ms=300000
# ----------------------------------------
############################# Zookeeper #############################
# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
zookeeper.connect=localhost:2181
# Timeout in ms for connecting to zookeeper
zookeeper.connection.timeout.ms=18000

Reference#

related

  • [[de-kafka-zookeepercommands]]
[kafka]Server Properties
https://yjinheon.netlify.app/posts/02de/kafka/de-kafka-90_serverproperties/
Author
Datamind
Published at
2024-10-25
License
CC BY-NC-SA 4.0