Class KafkaSpoutConfig<K,​V>

  • All Implemented Interfaces:
    Serializable

    public class KafkaSpoutConfig<K,​V>
    extends CommonKafkaSpoutConfig<K,​V>
    KafkaSpoutConfig defines the required configuration to connect a consumer to a consumer group, as well as the subscribing topics.
    See Also:
    Serialized Form
    • Constructor Detail

      • KafkaSpoutConfig

        public KafkaSpoutConfig​(KafkaSpoutConfig.Builder<K,​V> builder)
        Creates a new KafkaSpoutConfig using a Builder.
        Parameters:
        builder - The Builder to construct the KafkaSpoutConfig from
    • Method Detail

      • builder

        public static KafkaSpoutConfig.Builder<String,​String> builder​(String bootstrapServers,
                                                                            String... topics)
        Factory method that creates a Builder with String key/value deserializers.
        Parameters:
        bootstrapServers - The bootstrap servers for the consumer
        topics - The topics to subscribe to
        Returns:
        The new builder
      • builder

        public static KafkaSpoutConfig.Builder<String,​String> builder​(String bootstrapServers,
                                                                            Set<String> topics)
        Factory method that creates a Builder with String key/value deserializers.
        Parameters:
        bootstrapServers - The bootstrap servers for the consumer
        topics - The topics to subscribe to
        Returns:
        The new builder
      • builder

        public static KafkaSpoutConfig.Builder<String,​String> builder​(String bootstrapServers,
                                                                            Pattern topics)
        Factory method that creates a Builder with String key/value deserializers.
        Parameters:
        bootstrapServers - The bootstrap servers for the consumer
        topics - The topic pattern to subscribe to
        Returns:
        The new builder
      • getOffsetsCommitPeriodMs

        public long getOffsetsCommitPeriodMs()
      • isTupleTrackingEnforced

        public boolean isTupleTrackingEnforced()
      • getConsumerGroupId

        public String getConsumerGroupId()
      • setConsumerGroupId

        public void setConsumerGroupId​(String groupId)
      • getMaxUncommittedOffsets

        public int getMaxUncommittedOffsets()
      • isEmitNullTuples

        public boolean isEmitNullTuples()
      • getMetricsTimeBucketSizeInSecs

        public int getMetricsTimeBucketSizeInSecs()