Skip to content

[client]Fix consumer of python queue size is zero - #5706

Merged
sijie merged 1 commit into
apache:masterfrom
AmateurEvents:fix/consumer-queue-size-is-zero
Nov 21, 2019
Merged

sijie merged 1 commit into
apache:masterfrom
AmateurEvents:fix/consumer-queue-size-is-zero

Conversation

@tuteng

@tuteng tuteng commented Nov 20, 2019

Copy link
Copy Markdown
Member

Fixes #5634

Master Issue: #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

@tuteng tuteng changed the title Fix consumer of python queue size is zero [client]Fix consumer of python queue size is zero Nov 20, 2019
@tuteng
tuteng requested review from jiazhai, merlimat and sijie November 20, 2019 03:16
@tuteng tuteng self-assigned this Nov 20, 2019
@tuteng tuteng added component/c++ type/bug The PR fixed a bug or issue reported a bug labels Nov 20, 2019
@tuteng tuteng added this to the 2.5.0 milestone Nov 20, 2019
@tuteng

tuteng commented Nov 20, 2019

Copy link
Copy Markdown
Member Author

run integration tests

@sijie

sijie commented Nov 20, 2019

Copy link
Copy Markdown
Member

run integration tests

1 similar comment
@tuteng

tuteng commented Nov 21, 2019

Copy link
Copy Markdown
Member Author

run integration tests

@jiazhai

jiazhai commented Nov 21, 2019

Copy link
Copy Markdown
Member

run integration tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/2.4.3 type/bug The PR fixed a bug or issue reported a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python consumer does not accept receiver_queue_size=0

3 participants