apache / apache/pulsar-client-node

Compacted topic ... how to get the most recent message?

オープン
#380 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
164
フォーク
98
PR マージ指標
30日以内にマージされた PR はありません

説明

I am struggeling with reading from a compacted topic. How would I set up a consumer or a reader that receives the most recent message (published before starting up the client) on a compacted topic? I am only able to receive either all messages or none. I tried settting up the consumer with these options:

{
topic: "persistent://public/default/topic",
subscription: 'sub-1',
subscriptionType: 'Exclusive',
subscriptionInitialPosition: 'Earliest',
readCompacted: true,
}
{
topic: "persistent://public/default/topic",
subscription: 'sub-1',
subscriptionType: 'Exclusive',
subscriptionInitialPosition: 'Latest',
readCompacted: true,
}

...and for the reader:
{
topic: 'persistent://public/default/topic',
startMessageId: Pulsar.MessageId.latest(),
readCompacted: true
}
{
topic: 'persistent://public/default/topic',
startMessageId: Pulsar.MessageId.eariest(),
readCompacted: true
}

Am I missing something here?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Issue では consumer と reader の設定について言及されていますが、リポジトリ内のファイルもテストも指定されていません。まず、readCompacted を有効にして両方のサブスクリプション位置と reader のメッセージ ID を再現し、その後、動作をコンパクションされた topic のセマンティクスと比較してください。要求された最新メッセージの動作がサポートされているかどうかを判断し、必要な設定または具体的な不具合を文書化できれば完了です。

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

評価

技術スタック
javascript, node.js
領域
distributed-systems
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

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

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