eolivelli commented on code in PR #17161:
URL: https://github.com/apache/pulsar/pull/17161#discussion_r953699041
##########
pulsar-broker/src/test/java/org/apache/pulsar/client/api/DispatcherBlockConsumerTest.java:
##########
@@ -998,6 +999,11 @@ public void
testBrokerDispatchBlockAndSubAckBackRequiredMsgs() {
* maxUnAckPerDispatcher limit
**/
consumer1Sub2 = (ConsumerImpl<byte[]>)
pulsarClient.newConsumer().topic(topicName)
+ // in the scope of this test is important to not group
acks because
+ // the ack for messages happens after receiving a new
message from the topic.
+ // If the acks are sent in batch it may happen that the
dispatcher is still blocked until
+ // it receives the batched acks and the Consumer#receive
will return null.
+ .acknowledgmentGroupTime(0, TimeUnit.SECONDS)
Review Comment:
Using ackReceiptEnable can help as well.
Because you cam wait for the server to process the ack
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]