Class KafkaSpoutConfig<K,V>

java.lang.Object
org.apache.storm.kafka.spout.internal.CommonKafkaSpoutConfig<K,V>
org.apache.storm.kafka.spout.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:
  • Field Details

    • DEFAULT_OFFSET_COMMIT_PERIOD_MS

      public static final long DEFAULT_OFFSET_COMMIT_PERIOD_MS
      See Also:
    • DEFAULT_MAX_RETRIES

      public static final int DEFAULT_MAX_RETRIES
      See Also:
    • DEFAULT_MAX_UNCOMMITTED_OFFSETS

      public static final int DEFAULT_MAX_UNCOMMITTED_OFFSETS
      See Also:
    • DEFAULT_RETRY_SERVICE

      public static final KafkaSpoutRetryService DEFAULT_RETRY_SERVICE
    • DEFAULT_PROCESSING_GUARANTEE

      public static final KafkaSpoutConfig.ProcessingGuarantee DEFAULT_PROCESSING_GUARANTEE
    • DEFAULT_TUPLE_LISTENER

      public static final KafkaTupleListener DEFAULT_TUPLE_LISTENER
    • LOG

      public static final org.slf4j.Logger LOG
    • DEFAULT_METRICS_TIME_BUCKET_SIZE_SECONDS

      public static final int DEFAULT_METRICS_TIME_BUCKET_SIZE_SECONDS
      See Also:
  • Constructor Details

    • 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 Details

    • 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()
    • getProcessingGuarantee

      public KafkaSpoutConfig.ProcessingGuarantee getProcessingGuarantee()
    • isTupleTrackingEnforced

      public boolean isTupleTrackingEnforced()
    • getConsumerGroupId

      public String getConsumerGroupId()
    • getMaxUncommittedOffsets

      public int getMaxUncommittedOffsets()
    • getRetryService

      public KafkaSpoutRetryService getRetryService()
    • getTupleListener

      public KafkaTupleListener getTupleListener()
    • isEmitNullTuples

      public boolean isEmitNullTuples()
    • getMetricsTimeBucketSizeInSecs

      public int getMetricsTimeBucketSizeInSecs()
    • toString

      public String toString()
      Overrides:
      toString in class CommonKafkaSpoutConfig<K,V>