You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading a compacted topic with is_read_compacted=Truehas_message_available returns true even after all messages have been read when there is a tombstone message. This might be related to #199. As soon as any messages are added after compaction it behaves correctly again.
Python 3.12.4
pulsar-client 3.5.0
url="localhost"topic="tenant/namespace/topic"client=pulsar.Client(pulsar_url)
producer=client.create_producer(topic)
producer.send(
b'message',
partition_key="1",
)
# tombstone messageproducer.send(
b'',
partition_key="1",
)
# If there is only the tombstone message, then it returns False, presumably because the compacted topic is emptyproducer.send(
b'message2',
partition_key="2",
)
# compact the topic here with "bin/pulsar-admin topics compact tenant/namespace/topic"reader=client.create_reader(
topic=topic,
start_message_id=pulsar.MessageId.earliest,
is_read_compacted=True,
)
whilereader.has_message_available():
msg=reader.read_next()
print(msg.data())
Once another message has been sent, the reader operates correctly again.
When reading a compacted topic with
is_read_compacted=True
has_message_available
returns true even after all messages have been read when there is a tombstone message. This might be related to #199. As soon as any messages are added after compaction it behaves correctly again.Python 3.12.4
pulsar-client 3.5.0
Once another message has been sent, the reader operates correctly again.
The text was updated successfully, but these errors were encountered: