You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/11/20 03:16:25 UTC
[GitHub] [pulsar] tuteng opened a new pull request #5706: Fix consumer of
python queue size is zero
tuteng opened a new pull request #5706: Fix consumer of python queue size is zero
URL: https://github.com/apache/pulsar/pull/5706
Fixes https://github.com/apache/pulsar/issues/5634
Master Issue: https://github.com/apache/pulsar/issues/5634
### Motivation
In java clients, when we call the `receive`, we will block it until a message arrives. in python clients, when we call the `receive` function, we add a delay parameter of 100ms. when the queue size is 0, the `receive` will have a strict check on the queue size, causing the following exception to be thrown
```
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
```
### Modifications
* Removing timeout parameter in synchronous `receive`
* Add test for queue size is 0
### Verifying this change
Add Test
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services