Class StreamConsumerFactory


  • public abstract class StreamConsumerFactory
    extends Object
    Factory for a stream which provides a consumer and a metadata provider for the stream
    • Constructor Detail

      • StreamConsumerFactory

        public StreamConsumerFactory()
    • Method Detail

      • createPartitionLevelConsumer

        public abstract PartitionLevelConsumer createPartitionLevelConsumer​(String clientId,
                                                                            int partition)
        Creates a partition level consumer which can fetch messages from a partitioned stream
        Parameters:
        clientId - a client id to identify the creator of this consumer
        partition - the partition id of the partition for which this consumer is being created
        Returns:
      • createStreamLevelConsumer

        public abstract StreamLevelConsumer createStreamLevelConsumer​(String clientId,
                                                                      String tableName,
                                                                      Set<String> fieldsToRead,
                                                                      String groupId)
        Creates a stream level consumer (high level) which can fetch messages from the stream
        Parameters:
        clientId - a client id to identify the creator of this consumer
        tableName - the table name for the topic of this consumer
        fieldsToRead - the fields to read from the source stream
        groupId - consumer group Id
        Returns:
        the stream level consumer
      • createPartitionMetadataProvider

        public abstract StreamMetadataProvider createPartitionMetadataProvider​(String clientId,
                                                                               int partition)
        Creates a metadata provider which provides partition specific metadata
        Parameters:
        clientId - a client id to identify the creator of this consumer
        partition - the partition id of the partition for which this metadata provider is being created
        Returns:
      • createStreamMetadataProvider

        public abstract StreamMetadataProvider createStreamMetadataProvider​(String clientId)
        Creates a metadata provider which provides stream specific metadata
        Parameters:
        clientId - a client id to identify the creator of this consumer
        Returns: