Kafka messages were processed twice after rebalancing

Đang mở
#502 0 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
18/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
kafka, python

Hướng nghiên cứu

The report describes a Faust worker on a 4-partition Kafka topic that reprocesses 3 already-handled messages after a scale-out rebalance. Start by reproducing it with two local Faust workers and a multi-partition topic, then check when offsets are committed relative to the partition revoke and assign callbacks. Done means a test shows no message is handled twice across a rebalance, or the maintainers confirm it is expected under at-least-once delivery.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Checklist

  • [-] I have included information about relevant versions
  • [-] I have verified that the issue persists when using the master branch of Faust.

Steps to reproduce

Tell us what you did to cause something to happen.

I have 1 replica of a faust streaming service that listens to a kafka topic with 4 partitions. This service is currently processing kafka messages when our autoscaler scales it into 2 replicas which causes the rebalancing. Before rebalancing, the first replica processed 3 messages, and after rebalancing, the same 3 kafka messages were reprocessed in the second replica.

Expected behavior

I expect that the 3 messages that were already processed in the first replica should not be reprocessed in the second replica since the these messages should be committed before rebalancing

Actual behavior

These 3 messages were processed twice. The first time in the first replica and the second time in the second replica.

Versions

Python version: 3.7.13
Faust version: 0.10.12
Operating system: Debian GNU/Linux 10
Kafka version: 2.3.1

Ngôn ngữ chính
Python
Star
1.9k
Fork
205
Merge trung bình
2 giờ 2 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của faust-streaming/faust

Tất cả issue của faust-streaming/faust

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.