Interface ProducerIterator<M extends Message>
-
- All Superinterfaces:
AutoCloseable
,Iterator<M>
- All Known Implementing Classes:
AbstractProducer
,FileBlobMessageProducer
,RandomDocumentMessageProducer
,RandomStringBlobMessageProducer
public interface ProducerIterator<M extends Message> extends Iterator<M>, AutoCloseable
A ProducerIterator returnsMessage
. It also has the logic to return a partition index, that will be used to run concurrent consumers.- Since:
- 9.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description int
getPartition(M message, int partitions)
Returns a partition associated with theMessage
.default void
remove()
The remove method is not needed.-
Methods inherited from interface java.lang.AutoCloseable
close
-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next
-
-