apache / apache/pulsar-client-cpp
[pulsar-client-cpp] Partition key from producer does arrive in broker
- Ngôn ngữ chính
- C++
- Star
- 71
- Fork
- 90
- Merge trung bình
- 2 giờ 33 phút
- Pull request đã merge (30 ngày)
- 3
Mô tả
**Describe the bug**
When using the Java client producer, the setting of Key in MessageBuilder correctly coveys this metadata to the broker. C++ client consumers can then successfully use _Key_Shared_ subscription on this topic and we're seeing the expected keys-based consumption behavior.
However, when we use a C++ client producer, we do not get a "shared key" consumption behavior over the subscribed consumers.
**To Reproduce**
Steps to reproduce the behavior:
1. Initiate a Java client producer. Add a Key to the MessageBuidler.
2. Send messages using the MessageBuilder
3. Initiate two C++ consumers using the "Key_Shared" subscription
4. See key-based distributed messages over the consumers.
5. Now stop the Java client producer
6. Start a CPP client producer that sets the same metadata
7. Now only one of the C++ client consumers retrieves all messages
**Expected behavior**
We'd expect to see the same "key-shared" message distribution over the consumers with a C++ client producer as with its Java equivalent.
**Additional context**
We suspect a difference in the protobuf schema between the Java and C++ client producers for setting the partition or ordering key and conveying this metadata to the broker. It seems that the broker does not receive the message metadata from the C++ client producer correctly.
NB: We are using the same version of C++ client and broker (both from Pulsar v2.5.0).
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với MessageBuilder của producer C++ và so sánh cách metadata key hoặc ordering-key của nó được tuần tự hóa với hành vi của producer Java được mô tả trong các bước tái hiện. Tái hiện vấn đề với hai consumer C++ Key_Shared và cả hai loại producer bằng Pulsar 2.5.0. Được xem là hoàn tất khi producer C++ tạo ra cùng một cách phân phối dựa trên key giữa các consumer như producer Java.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cpp, java
- Lĩnh vực
- distributed-systems
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100