Describe the bug
A reader is created to read messages from a topic. The reader throws an exception when reader.readNext() is called.
To Reproduce
- Messages are created with the attached CsvExample.java program (TPCH line item data is used as CSV file).
- A reader is created and run with the attached ReaderExample.java program.
- Most of the time the reader throws an exception, although sometimes it doesn't.
- This is the output:
Num lines: 1000000
Message id: 71:99:-1:9999
Num lines: 2000000
Message id: 71:200:-1:9520
Exception in thread "main" java.lang.IllegalStateException: recycled multiple times
at org.apache.pulsar.shade.io.netty.util.Recycler$Stack.pop(Recycler.java:553)
at org.apache.pulsar.shade.io.netty.util.Recycler.get(Recycler.java:162)
at org.apache.pulsar.common.util.collections.BitSetRecyclable.create(BitSetRecyclable.java:1200)
at org.apache.pulsar.client.impl.PersistentAcknowledgmentsGroupingTracker.addBatchIndexAcknowledgment(PersistentAcknowledgmentsGroupingTracker.java:138)
at org.apache.pulsar.client.impl.ConsumerImpl.doAcknowledge(ConsumerImpl.java:551)
at org.apache.pulsar.client.impl.ConsumerBase.doAcknowledgeWithTxn(ConsumerBase.java:390)
at org.apache.pulsar.client.impl.ConsumerBase.acknowledgeCumulativeAsync(ConsumerBase.java:379)
at org.apache.pulsar.client.impl.ConsumerBase.acknowledgeCumulativeAsync(ConsumerBase.java:363)
at org.apache.pulsar.client.impl.ConsumerBase.acknowledgeCumulativeAsync(ConsumerBase.java:326)
at org.apache.pulsar.client.impl.ReaderImpl.readNext(ReaderImpl.java:119)
at ReaderExample.main(ReaderExample.java:19)
Expected behavior
The reader to read all messages instead of throwing an exception.
ReaderExample.java.zip
CsvExample.java.zip
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
A reader is created to read messages from a topic. The reader throws an exception when reader.readNext() is called.
To Reproduce
Expected behavior
The reader to read all messages instead of throwing an exception.
ReaderExample.java.zip
CsvExample.java.zip
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.