Coding

Apache Kafka란?

해당 게시글은 Apache Kafka 3.8.0 기준으로 작성되었습니다. Apache Kafka의 기본 개념에 대해 다룹니다. Apache Kafka란? Apache Kafka는 이벤트 스트림 처리, 실시간 데이터 파이프라인, 대규모 데이터 통합에 사용되는 오픈 소스 분산 스트리밍 시스템이다. Kafka의 이름은 Franz Kafka에서 왔다. What is the relation between Kafka, the writer, and Apache Kafka, the distributed messaging system? Apache Kafka 사용 사례 Event(메시지/데이터)가 사용되는 모든 곳에서 사용 Messaging System IOT 디바이스로부터 데이터 수집 애플리케이션에서 발생하는 로그 수집 Reatime Event Stream Processing (Fraud Detection, 이상 감지 등) DB 동기화 (MSA 기반의 분리된 DB간 동기화) 실시간 ETL (Extract, Transform, Load) Spark, Flink, Storm, Hadoop 과 같은 빅데이터 기술과 같이 사용 Kafka, Pulsar, RabbitMQ 속도 비교 Kafka Pulsar RabbitMQ(Mirrored) Peak Throughput(MB/s) 605MB/s 305MB/s 38MB/s p99 Latency(ms) 5 ms(200 MB/s load) 25 ms(200 MB/s load) 1 ms*(reduced 30 MB/s load) *30MB/s 이상의 처리량에서는 RabbitMQ 지연 시간이 크게 저하된다....

October 21, 2024 · minwoo.kim
Coding

Kafka topic retention.ms 변경하는 법

KAFKA_BOOTSTRAP_SERVER : Kafka Bootstrap Server 주소 KAFKA_TOPIC : retention.ms 를 변경할 Kafka Topic 구 버전의 경우 --bootstrap-server 가 아닌, --zookeeper 를 사용한다. 해당 글은 Kafka version 3.4.0 기준으로 작성함. 변경 시도 kafka-topics.sh --bootstrap-server $KAFKA_BOOTSTRAP_SERVER --alter --topic $KAFKA_TOPIC --config retention.ms=43200000 Kafka topic을 위 명령어로 변경을 시도 했지만 아래와 같이 에러가 났다. 당연히 kafka-topics.sh 명령어를 사용할 줄 알았지만 아니였음. Option combination "[bootstrap-server],[config]" can't be used with option "[alter]" (the kafka-configs CLI supports altering topic configs with a --bootstrap-server option 해결 방법 kafka-configs....

April 25, 2023 · minwoo.kim