Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Pub/Sub c++ client: How to prevent/reduce ack failures on at least once delivery subscription

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp, google-cloud
Lĩnh vực
cloud, distributed-systems

Hướng nghiên cứu

Bắt đầu bằng cách kiểm tra google/cloud/pubsub/internal/ack_handler_wrapper.cc:29 và cấu hình client trong báo cáo, sau đó tái hiện các lỗi bằng bài kiểm thử tải được mô tả. Theo dõi hành vi acknowledgement và gia hạn deadline liên quan đến các lỗi UNAVAILABLE và việc redelivery. Công việc được xem là hoàn tất khi đã xác định được nguyên nhân của các lỗi ack và redelivery bị trì hoãn, cùng với một cách đã được xác minh để giảm thiểu hoặc ngăn chặn chúng.

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

Mô tả

priority: p3 type: question

Client version: v2.39.0
MaxDeadline = seconds(0) (default value)
MaxDeadlineExtension = seconds(180)
MinDeadlineExtension = seconds(60)
MaxOutstandingMessages = 250
MaxConcurrency = 1

Time to time acks are failing. There is no retry for at least once delivery. How to reduce/prevent these failures? It happens 10-20 times a day.

Some of the logged errors [file_name] - [message]

[NTPubSubLogger] /google-cloud-cpp/google/cloud/pubsub/internal/ack_handler_wrapper.cc:29 - error while trying to ack(), status=UNAVAILABLE: recvmsg:Connection reset by peer

[NTPubSubLogger] /google-cloud-cpp/google/cloud/pubsub/internal/ack_handler_wrapper.cc:29 - error while trying to ack(), status=UNAVAILABLE: 502:Bad Gateway

It sounds like network issue but I doubt that. It happens every day 10-20 times. I can reproduce it with a 10 minutes of load tests by consuming/processing 300 messages per second.

Messages are ordered by account id in the system. When this happens the messages are stuck on pub/sub for 10-20 minutes because of unacked message. initial deadline=60 seconds, max deadline = 180 seconds. I observed the cpp client logs in debug mode. There is no ModifyAckDeadlineRequest is being made but still messages redelivered between 10-20 minutes later, in fact they should arrive in a few minutes. (That's another issue and maybe not related to the client.)

Ngôn ngữ chính
C++
Star
659
Fork
471
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
100

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 googleapis/google-cloud-cpp

Tất cả issue của googleapis/google-cloud-cpp

Issue tương tự

Thêm issue về C++

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.