RobertIndie commented on code in PR #18107:
URL: https://github.com/apache/pulsar/pull/18107#discussion_r1000197933
##########
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/TopicsConsumerImplTest.java:
##########
@@ -163,6 +168,72 @@ public void testGetConsumersAndGetTopics() throws
Exception {
consumer.close();
}
+ @Test
+ public void testMaxAcknowledgmentGroupSizeInvalid() {
+ try {
+ pulsarClient.newConsumer()
+ .maxAcknowledgmentGroupSize(0);
+ fail("Should throw exception");
+ } catch (IllegalArgumentException e) {
+ // expect exception
+ assertEquals(e.getMessage(), "acknowledgementsGroupSize needs to
be > 0");
+ }
+ }
Review Comment:
Let's move this test to
`org.apache.pulsar.client.impl.ConsumerBuilderImplTest`
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ConsumerConfigurationData.java:
##########
@@ -137,6 +137,12 @@
)
private long acknowledgementsGroupTimeMicros =
TimeUnit.MILLISECONDS.toMicros(100);
+ @ApiModelProperty(
+ name = "acknowledgementsGroupSize",
+ value = "Group a consumer acknowledgment for the number of
messages."
+ )
+ private int acknowledgementsGroupSize = 1000;
+
Review Comment:
```suggestion
@ApiModelProperty(
name = "acknowledgementsGroupSize",
value = "Group a consumer acknowledgment for the number of
messages."
)
private int maxAcknowledgmentGroupSize = 1000;
```
Make it consistent. And please change the description.
--
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]