apache / apache/pulsar-client-node
Waiting for ack
- Dominant language
- C++
- Stars
- 164
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the NodeJS client's subscribe listener and acknowledgement flow shown in the example, checking how receiverQueueSize: 0 and acknowledgements made outside the listener are handled. Reproduce the subscription with one message in flight and determine whether the next message arrives before acknowledge(msg); done means the sequencing is corrected or the supported behavior is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100