apache / apache/pulsar-client-cpp

[pulsar-client-cpp] Partition key from producer does arrive in broker

未关闭
#111 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
71
派生
90
平均合并
2 小时 33 分钟
30 天内合并 PR
3

描述

**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).

贡献指南

打开贡献指南

调研方向

从 C++ producer 的 MessageBuilder 开始,将其 key 或 ordering-key 元数据的序列化方式与复现步骤中描述的 Java producer 行为进行比较。使用 Pulsar 2.5.0,通过两个 C++ Key_Shared consumer 和两种 producer 类型复现该问题。当 C++ producer 在各 consumer 之间产生与 Java producer 相同的基于 key 的分配时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp, java
领域
distributed-systems
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。