KafkaConsumer 파티션 할당 예시

KafkaConsumer 파티션 할당 예시 An architecture diagram generated by Archify. 프로듀서 · topic: orders · Architecture component 프로듀서 topic: orders orders · Partition 0 · Leader 레플리카 · 브로커 1 orders · Partition 0 Leader 레플리카 orders · Partition 1 · Leader 레플리카 · 브로커 2 orders · Partition 1 Leader 레플리카 orders · Partition 2 · Leader 레플리카 · 브로커 3 orders · Partition 2 Leader 레플리카 컨슈머 1 · Partition 0 담당 · 논리적 consumer group: order-processor 컨슈머 1 Partition 0 담당 컨슈머 2 · Partition 1 담당 · 논리적 consumer group: order-processor 컨슈머 2 Partition 1 담당 컨슈머 3 · Partition 2 담당 · 논리적 consumer group: order-processor 컨슈머 3 Partition 2 담당 메시지 쓰기 3:3 할당 예시 브로커 1 브로커 2 브로커 3 논리적 consumer group: order-processor Legend 백엔드 서비스 메시지 버스 외부 시스템

Partitions

  • • 쓰기는 leader로 전송
  • • 설정한 경우 follower fetch도 가능

KafkaConsumer

  • • 그림은 3개 파티션과 3명 소비자의 예시
  • • 소비자 한 명이 여러 파티션을 맡을 수 있음