Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ack request not set requestId when enable AckWithResponse option #779

Closed
redlsz opened this issue May 27, 2022 · 0 comments · Fixed by #780
Closed

Ack request not set requestId when enable AckWithResponse option #779

redlsz opened this issue May 27, 2022 · 0 comments · Fixed by #780

Comments

@redlsz
Copy link
Contributor

redlsz commented May 27, 2022

Expected behavior

When client enable AckWithResponse option, an AckResponse command is expected to receive from broker after an AckRequest command.

Actual behavior

No AckResponse command received until client request time out. Factly, in broker side, AckResponse is supported only when connection ProtocolVersion is or above 17 and requestId is set in AckRequest.

INFO[0000] [Connecting to broker] remote_addr="pulsar://localhost:6650"
INFO[0000] [TCP connection established] local_addr="127.0.0.1:38574" remote_addr="pulsar://localhost:6650"
INFO[0000] [Connection is ready] local_addr="127.0.0.1:38574" remote_addr="pulsar://localhost:6650"
INFO[0000] Lookup result: &{LogicalAddr:pulsar://localhost:6650 PhysicalAddr:pulsar://localhost:6650} consumerID=1 name=twpkx subscription=my-sub topic="persistent://public/default/topic-0-partition-0"
INFO[0000] [Connected consumer] consumerID=1 name=twpkx subscription=my-sub topic="persistent://public/default/topic-0-partition-0"
INFO[0000] Created consumer with queueCh cap [1000], len [0] queueSize [1000] consumerID=1 name=twpkx subscription=my-sub topic="persistent://public/default/topic-0-partition-0"
INFO[0000] [get into runEventsLoop] consumerID=1 name=twpkx subscription=my-sub topic="persistent://public/default/topic-0-partition-0"
INFO[0000] [dispatcher received connection event] consumerID=1 name=twpkx subscription=my-sub topic="persistent://public/default/topic-0-partition-0"
INFO[0000] dispatcher requesting initial permits=1000 consumerID=1 name=twpkx subscription=my-sub topic="persistent://public/default/topic-0-partition-0"
Received message msgId: pulsar.trackingMessageID{messageID:pulsar.messageID{ledgerID:267, entryID:10, batchIdx:0, partitionIdx:0}, tracker:(*pulsar.ackTracker)(nil), consumer:(*pulsar.partitionConsumer)(0xc000162000), receivedTime:time.Time{wall:0xc09c38b1c9a0a930, ext:3726914057, loc:(*time.Location)(0x106e4a0)}} -- content: 'hello-0'
ERRO[0033] [Ack with response error] consumerID=1 error="request timed out" name=twpkx subscription=my-sub topic="persistent://public/default/topic-0-partition-0"
request timed out

Steps to reproduce

Subscribe topics with ConsumerOptions AckWithResponse option set true.

System configuration

Pulsar version: 2.9

wolfstudy pushed a commit that referenced this issue May 27, 2022
…780)

Fixes #779

Motivation
Fix bug in #779

Modifications
Set requestId int the ack request command when the AckWithResponse option is enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant