BewareMyPower commented on issue #15704:
URL: https://github.com/apache/pulsar/issues/15704#issuecomment-1133916247
It looks like zero queue consumer cannot be used on a partitioned topic. I
tested the Java code as well.
```java
var topic = "my-topic";
var admin =
PulsarAdmin.builder().serviceHttpUrl("http://localhost:8080").build();
try {
admin.topics().createPartitionedTopic(topic, 1);
} catch (PulsarAdminException ignored) {
}
var client =
PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build();
var consumer = client.newConsumer()
.topic(topic)
.subscriptionName("sub-xxx")
.receiverQueueSize(0)
.subscribe();
```
The error message is more friendly and clear:
> IllegalArgumentException: Receiver queue size needs to be greater than 0
for Topics Consumer
--
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]