apache / apache/pulsar-client-node

Waiting for ack

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

説明

I'm trying to consume 1 message at a time, and i'm acknowledging the message outside of the listener. But it's just grabbing the next message without waiting for the ack.

code sample:
```js
let msg;
let msgConsumer;

const consumer = client.subscribe({
topic: `persistent://public/default/test1`,
subscription: `sub1`,
subscriptionType: 'Exclusive',
receiverQueueSize:0,
ackTimeoutMs:300000,
listener: (msg,msgConsumer) => {
console.log(msg.getData().toString());
msg = msg;
msgConsumer = msgConsumer;

}
});

function someWhereElse(){

msgConsumer.acknowledge(msg);

}
```
Is something like this possible?

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

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

調査の方向性

例に示されている NodeJS クライアントの subscribe リスナーと acknowledgement フローから始め、receiverQueueSize: 0 とリスナーの外部で行われる acknowledgement がどのように処理されるかを確認します。1 件のメッセージだけが処理中の状態で subscription を再現し、acknowledge(msg) の前に次のメッセージが到着するかどうかを判断します。シーケンスが修正されるか、サポートされている動作がドキュメント化されれば完了です。

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

評価

技術スタック
javascript, nodejs
領域
distributed-systems
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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