bry00 opened a new issue #5634: Python consumer does not accept receiver_queue_size=0 URL: https://github.com/apache/pulsar/issues/5634 **Describe the bug** Python client does not accept receiver queue size equal to 0, but according to [documentation](https://pulsar.apache.org/docs/v2.0.1-incubating/cookbooks/message-queue#client-configuration-changes): > If you’d like to have tight control over message dispatching across consumers, set the consumers’ receiver queue size very low (potentially even to 0 if necessary). while other clients (e.g. C++ and Java clients) accept receiver queue size equal to 0 and work according to documentation. **To Reproduce** Steps to reproduce the behavior: 1. Run the following Python code: ```python #!/usr/bin/env python3 import sys import pulsar client = pulsar.Client('pulsar://localhost:6650') consumer = client.subscribe('abcd', subscription_name='xyz', consumer_type=pulsar.ConsumerType.Shared, receiver_queue_size=0) msg = consumer.receive() print("Received message: %s" % msg.data(), flush=True) consumer.acknowledge(msg) client.close() ``` 2. See error **Expected behavior** Python client consumer API (` client.subscribe`) should accept parameter `receiver_queue_size=0` as described in [documentation](https://pulsar.apache.org/docs/v2.0.1-incubating/cookbooks/message-queue#client-configuration-changes) and as function correctly for other clients (C++, Java). **Screenshots** ```console 2019-11-12 15:11:57.331 INFO Client:88 | Subscribing on Topic :abcd 2019-11-12 15:11:57.331 INFO ConnectionPool:72 | Created connection for pulsar://localhost:6650 2019-11-12 15:11:57.333 INFO ClientConnection:324 | [[::1]:51100 -> [::1]:6650] Connected to broker 2019-11-12 15:11:57.398 INFO HandlerBase:52 | [persistent://public/default/abcd, xyz, 0] Getting connection from pool 2019-11-12 15:11:57.423 INFO ConnectionPool:72 | Created connection for pulsar://cfc0ca6995fc:6650 2019-11-12 15:11:57.424 INFO ClientConnection:326 | [[::1]:51101 -> [::1]:6650] Connected to broker through proxy. Logical broker: pulsar://cfc0ca6995fc:6650 2019-11-12 15:11:57.684 INFO ConsumerImpl:170 | [persistent://public/default/abcd, xyz, 0] Created consumer on broker [[::1]:51101 -> [::1]:6650] 2019-11-12 15:11:57.684 WARN ConsumerImpl:631 | [persistent://public/default/abcd, xyz, 0] Can't use this function if the queue size is 0 Traceback (most recent call last): File "tst.py", line 10, in <module> msg = consumer.receive() File "/python3.7/site-packages/pulsar/__init__.py", line 930, in receive msg = self._consumer.receive() Exception: Pulsar error: InvalidConfiguration ``` **Desktop (please complete the following information):** - OS: macOS Catalina (v: 10.15.1)
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services