public interface ProducerIterator<M extends Message> extends Iterator<M>, AutoCloseable
Message. It also has the logic to return a partition index, that will be used to
run concurrent consumers.| Modifier and Type | Method and Description |
|---|---|
int |
getPartition(M message,
int partitions)
Returns a partition associated with the
Message. |
default void |
remove()
The remove method is not needed.
|
forEachRemaining, hasNext, nextclosedefault void remove()
int getPartition(M message, int partitions)
Message. The value returned must be between 0 and lower than
partitions.message - the message to shardpartitions - the number of partitionsCopyright © 2019 Nuxeo. All rights reserved.