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,
Environment:
Python 3.11.5
pulsar-client 3.4.0
Reproduction
Create reader with start_message_id=pulsar.MessageId.earliest:
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,
Environment: Python 3.11.5 pulsar-client 3.4.0
Reproduction
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)
while reader.has_message_available(): # It is True on first iteration but should be False msg = reader.read_next(timeout_millis=5000)
print("No more messages")