You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "adamdelezuch89 (via GitHub)" <gi...@apache.org> on 2024/02/16 12:27:41 UTC
[I] Reader.has_message_available() returns True even if no messages to consume, when start_message_id is earliest [pulsar-client-python]
adamdelezuch89 opened a new issue, #199:
URL: https://github.com/apache/pulsar-client-python/issues/199
Hi,
Reader.has_message_available() returns True on first execution, even if no message available on topic. Issue is only, when reader is created with start_message_id=pulsar.MessageId.earliest,
# Reproduction
```
from my_schemas import Schema
import pulsar
pulsar_url = "localhost"
topic = "tenant/namespace/topic"
name = "name"
schema = pulsar.schema.AvroSchema(Schema)
client = pulsar.Client(pulsar_url)
reader = client.create_reader(
topic=topic,
start_message_id=pulsar.MessageId.earliest,
schema=schema,
reader_name=name,
)
reader.seek(pulsar.MessageId.latest) # Or any last message on topic
while True:
if not reader.has_message_available(): # It is True on first iteration but should be False
break
msg = reader.read_next(timeout_millis=5000) # Raises unexpected TIMEOUT exception
print("No more messages")
```
--
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: commits-unsubscribe@pulsar.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Reader.has_message_available() returns True even if no messages to consume, when start_message_id is earliest [pulsar-client-python]
Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on issue #199:
URL: https://github.com/apache/pulsar-client-python/issues/199#issuecomment-1972784286
It's a bug of C++ client, I will fix it ASAP.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Reader.has_message_available() returns True even if no messages to consume, when start_message_id is earliest [pulsar-client-python]
Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on issue #199:
URL: https://github.com/apache/pulsar-client-python/issues/199#issuecomment-1989866210
The fix https://github.com/apache/pulsar-client-cpp/pull/409 is included in the C++ client 3.5.0.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Reader.has_message_available() returns True even if no messages to consume, when start_message_id is earliest [pulsar-client-python]
Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat closed issue #199: Reader.has_message_available() returns True even if no messages to consume, when start_message_id is earliest
URL: https://github.com/apache/pulsar-client-python/issues/199
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org