Class DuplicatingPollStrategy
- java.lang.Object
-
- com.linkedin.venice.unit.kafka.consumer.poll.AbstractPollStrategy
-
- com.linkedin.venice.unit.kafka.consumer.poll.DuplicatingPollStrategy
-
- All Implemented Interfaces:
PollStrategy
public class DuplicatingPollStrategy extends AbstractPollStrategy
APollStrategy
implementation which can introduce duplicates. The message payload is duplicated verbatim, but the Kafka offsets are incremented, as it would happen in a real Kafka deployment.
-
-
Field Summary
-
Fields inherited from class com.linkedin.venice.unit.kafka.consumer.poll.AbstractPollStrategy
keepPollingWhenEmpty
-
-
Constructor Summary
Constructors Constructor Description DuplicatingPollStrategy(AbstractPollStrategy basePollStrategy, java.util.Set<PubSubTopicPartitionOffset> PubSubTopicPartitionOffsetsToDuplicate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PubSubTopicPartitionOffset
getNextPoll(java.util.Map<PubSubTopicPartition,java.lang.Long> offsets)
-
Methods inherited from class com.linkedin.venice.unit.kafka.consumer.poll.AbstractPollStrategy
incrementOffset, poll
-
-
-
-
Constructor Detail
-
DuplicatingPollStrategy
public DuplicatingPollStrategy(AbstractPollStrategy basePollStrategy, java.util.Set<PubSubTopicPartitionOffset> PubSubTopicPartitionOffsetsToDuplicate)
-
-
Method Detail
-
getNextPoll
protected PubSubTopicPartitionOffset getNextPoll(java.util.Map<PubSubTopicPartition,java.lang.Long> offsets)
- Specified by:
getNextPoll
in classAbstractPollStrategy
-
-