apache / apache/pulsar-client-cpp

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

オープン
#111 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
71
フォーク
90
平均マージ
2時間 33分
マージ済み PR(30日)
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 を使用し、2 つの C++ Key_Shared consumer と両方の producer タイプで問題を再現します。C++ producer が Java producer と同じキーに基づく consumer 間の分散を生成すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp, java
領域
distributed-systems
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。