Class LocalBootstrappingVeniceChangelogConsumer<K,​V>

  • Type Parameters:
    K -
    V -
    All Implemented Interfaces:
    BootstrappingVeniceChangelogConsumer<K,​V>, VeniceChangelogConsumer<K,​V>

    public class LocalBootstrappingVeniceChangelogConsumer<K,​V>
    extends VeniceChangelogConsumerImpl<K,​V>
    This is a wrapper class on top of InternalBootstrappingVeniceChangelogConsumerImpl. This confines the usage of this class for clients to the methods exposed on the interface. This is meant to prevent users from doing seek() calls which would render the local state inconsistent.
    • Constructor Detail

      • LocalBootstrappingVeniceChangelogConsumer

        public LocalBootstrappingVeniceChangelogConsumer​(ChangelogClientConfig changelogClientConfig,
                                                         PubSubConsumerAdapter pubSubConsumer,
                                                         java.lang.String consumerId)
    • Method Detail

      • processRecordBytes

        protected <T> T processRecordBytes​(java.nio.ByteBuffer decompressedBytes,
                                           T deserializedValue,
                                           byte[] key,
                                           java.nio.ByteBuffer value,
                                           PubSubTopicPartition partition,
                                           int readerSchemaId,
                                           long recordOffset)
                                    throws java.io.IOException
        Overrides:
        processRecordBytes in class VeniceChangelogConsumerImpl<K,​V>
        Throws:
        java.io.IOException
      • seekWithBootStrap

        public java.util.concurrent.CompletableFuture<java.lang.Void> seekWithBootStrap​(java.util.Set<java.lang.Integer> partitions)
      • start

        public java.util.concurrent.CompletableFuture<java.lang.Void> start​(java.util.Set<java.lang.Integer> partitions)
        Description copied from interface: BootstrappingVeniceChangelogConsumer
        Start performs both a topic subscription and catch up. The client will look at the latest offset in the server and sync bootstrap data up to that point in changes. Once that is done for all partitions, the future will complete. NOTE: This future may take some time to complete depending on how much data needs to be ingested in order to catch up with the time that this client started.
        Specified by:
        start in interface BootstrappingVeniceChangelogConsumer<K,​V>
        Parameters:
        partitions - which partition id's to catch up with
        Returns:
        a future that completes once catch up is complete for all passed in partitions.