class ConsumerSettings[K, V] extends AnyRef

Settings for consumers. See akka.kafka.consumer section in reference.conf. Note that the companion object provides apply and create functions for convenient construction of the settings, together with the with methods.

The constructor is Internal API.

Source
ConsumerSettings.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConsumerSettings
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ConsumerSettings(properties: Map[String, String], keyDeserializer: Option[Deserializer[K]], valueDeserializer: Option[Deserializer[V]], pollInterval: FiniteDuration, pollTimeout: FiniteDuration, stopTimeout: FiniteDuration, closeTimeout: FiniteDuration, commitTimeout: FiniteDuration, wakeupTimeout: FiniteDuration, maxWakeups: Int, commitRefreshInterval: Duration, dispatcher: String, commitTimeWarning: FiniteDuration, wakeupDebug: Boolean, waitClosePartition: FiniteDuration)
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0-M1) use the factory methods ConsumerSettings.apply and create instead

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate() @throws( ... )
  6. val closeTimeout: FiniteDuration
  7. val commitRefreshInterval: Duration
  8. val commitTimeWarning: FiniteDuration
  9. val commitTimeout: FiniteDuration
  10. val consumerFactory: (ConsumerSettings[K, V]) ⇒ Consumer[K, V]
  11. def createKafkaConsumer(): Consumer[K, V]

    Create a Kafka Consumer instance from these settings.

  12. val dispatcher: String
  13. val drainingCheckInterval: FiniteDuration
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def getCloseTimeout: Duration
  18. def getMetadataRequestTimeout: Duration
  19. def getOffsetForTimesTimeout: Duration
  20. def getPositionTimeout: Duration
  21. def getProperties: Map[String, AnyRef]

    Get the Kafka consumer settings as map.

  22. def getProperty(key: String): String

    Java API: Get a raw property.

    Java API: Get a raw property. null if it is not defined.

  23. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. val keyDeserializerOpt: Option[Deserializer[K]]
  26. val metadataRequestTimeout: FiniteDuration
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. val offsetForTimesTimeout: FiniteDuration
  31. val pollInterval: FiniteDuration
  32. val pollTimeout: FiniteDuration
  33. val positionTimeout: FiniteDuration
  34. val properties: Map[String, String]
  35. val stopTimeout: FiniteDuration
  36. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  37. def toString(): String
    Definition Classes
    ConsumerSettings → AnyRef → Any
  38. val valueDeserializerOpt: Option[Deserializer[V]]
  39. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  41. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. val waitClosePartition: FiniteDuration
  43. def withBootstrapServers(bootstrapServers: String): ConsumerSettings[K, V]

    A comma-separated list of host/port pairs to use for establishing the initial connection to the Kafka cluster.

  44. def withClientId(clientId: String): ConsumerSettings[K, V]

    An id string to pass to the server when making requests.

    An id string to pass to the server when making requests. The purpose of this is to be able to track the source of requests beyond just ip/port by allowing a logical application name to be included in server-side request logging.

  45. def withCloseTimeout(closeTimeout: Duration): ConsumerSettings[K, V]

    Java API: Set duration to wait for KafkaConsumer.close to finish.

  46. def withCloseTimeout(closeTimeout: FiniteDuration): ConsumerSettings[K, V]

    Set duration to wait for KafkaConsumer.close to finish.

  47. def withCommitRefreshInterval(commitRefreshInterval: Duration): ConsumerSettings[K, V]

    Java API: If set to a finite duration, the consumer will re-send the last committed offsets periodically for all assigned partitions.

    Java API: If set to a finite duration, the consumer will re-send the last committed offsets periodically for all assigned partitions. @see https://issues.apache.org/jira/browse/KAFKA-4682 Set to java.time.Duration.ZERO to switch it off.

    See also

    https://issues.apache.org/jira/browse/KAFKA-4682

  48. def withCommitRefreshInterval(commitRefreshInterval: Duration): ConsumerSettings[K, V]

    If set to a finite duration, the consumer will re-send the last committed offsets periodically for all assigned partitions.

    If set to a finite duration, the consumer will re-send the last committed offsets periodically for all assigned partitions.

    See also

    https://issues.apache.org/jira/browse/KAFKA-4682

  49. def withCommitTimeout(commitTimeout: Duration): ConsumerSettings[K, V]

    Java API: If offset commit requests are not completed within this timeout the returned Future is completed with akka.kafka.CommitTimeoutException.

  50. def withCommitTimeout(commitTimeout: FiniteDuration): ConsumerSettings[K, V]

    If offset commit requests are not completed within this timeout the returned Future is completed with akka.kafka.CommitTimeoutException.

  51. def withCommitWarning(commitTimeWarning: Duration): ConsumerSettings[K, V]

    Java API: If commits take longer than this time a warning is logged

  52. def withCommitWarning(commitTimeWarning: FiniteDuration): ConsumerSettings[K, V]

    If commits take longer than this time a warning is logged

  53. def withConsumerFactory(factory: (ConsumerSettings[K, V]) ⇒ Consumer[K, V]): ConsumerSettings[K, V]

    Replaces the default Kafka consumer creation logic.

  54. def withDispatcher(dispatcher: String): ConsumerSettings[K, V]

    Fully qualified config path which holds the dispatcher configuration to be used by the akka.kafka.KafkaConsumerActor.

    Fully qualified config path which holds the dispatcher configuration to be used by the akka.kafka.KafkaConsumerActor. Some blocking may occur.

  55. def withDrainingCheckInterval(drainingCheckInterval: Duration): ConsumerSettings[K, V]

    Java API: Check interval for TransactionalProducer when finishing transaction before shutting down consumer

  56. def withDrainingCheckInterval(drainingCheckInterval: FiniteDuration): ConsumerSettings[K, V]

    Scala API: Check interval for TransactionalProducer when finishing transaction before shutting down consumer

  57. def withGroupId(groupId: String): ConsumerSettings[K, V]

    A unique string that identifies the consumer group this consumer belongs to.

  58. def withMetadataRequestTimeout(metadataRequestTimeout: Duration): ConsumerSettings[K, V]

    Java API

  59. def withMetadataRequestTimeout(metadataRequestTimeout: FiniteDuration): ConsumerSettings[K, V]

    Scala API

  60. def withOffsetForTimesTimeout(offsetForTimesTimeout: Duration): ConsumerSettings[K, V]

    Java API: Limits the blocking on Kafka consumer offsetForTimes calls.

  61. def withOffsetForTimesTimeout(offsetForTimesTimeout: FiniteDuration): ConsumerSettings[K, V]

    Scala API: Limits the blocking on Kafka consumer offsetForTimes calls.

  62. def withPollInterval(pollInterval: Duration): ConsumerSettings[K, V]

    Java API: Set the interval from one scheduled poll to the next.

  63. def withPollInterval(pollInterval: FiniteDuration): ConsumerSettings[K, V]

    Set the interval from one scheduled poll to the next.

  64. def withPollTimeout(pollTimeout: Duration): ConsumerSettings[K, V]

    Java API: Set the maximum duration a poll to the Kafka broker is allowed to take.

  65. def withPollTimeout(pollTimeout: FiniteDuration): ConsumerSettings[K, V]

    Set the maximum duration a poll to the Kafka broker is allowed to take.

  66. def withPositionTimeout(positionTimeout: Duration): ConsumerSettings[K, V]

    Java API: Limits the blocking on Kafka consumer position calls.

  67. def withPositionTimeout(positionTimeout: FiniteDuration): ConsumerSettings[K, V]

    Scala API: Limits the blocking on Kafka consumer position calls.

  68. def withProperties(properties: Map[String, String]): ConsumerSettings[K, V]

    Java API: The raw properties of the kafka-clients driver, see constants in org.apache.kafka.clients.consumer.ConsumerConfig.

  69. def withProperties(properties: (String, String)*): ConsumerSettings[K, V]

    Scala API: The raw properties of the kafka-clients driver, see constants in org.apache.kafka.clients.consumer.ConsumerConfig.

  70. def withProperties(properties: Map[String, String]): ConsumerSettings[K, V]

    Scala API: The raw properties of the kafka-clients driver, see constants in org.apache.kafka.clients.consumer.ConsumerConfig.

  71. def withProperty(key: String, value: String): ConsumerSettings[K, V]

    The raw properties of the kafka-clients driver, see constants in org.apache.kafka.clients.consumer.ConsumerConfig.

  72. def withStopTimeout(stopTimeout: Duration): ConsumerSettings[K, V]

    Java API: The stage will await outstanding offset commit requests before shutting down, but if that takes longer than this timeout it will stop forcefully.

  73. def withStopTimeout(stopTimeout: FiniteDuration): ConsumerSettings[K, V]

    The stage will await outstanding offset commit requests before shutting down, but if that takes longer than this timeout it will stop forcefully.

  74. def withWaitClosePartition(waitClosePartition: Duration): ConsumerSettings[K, V]

    Java API: Time to wait for pending requests when a partition is closed.

  75. def withWaitClosePartition(waitClosePartition: FiniteDuration): ConsumerSettings[K, V]

    Time to wait for pending requests when a partition is closed.

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

  2. def withMaxWakeups(maxWakeups: Int): ConsumerSettings[K, V]

    Not used anymore

    Not used anymore

    Annotations
    @deprecated
    Deprecated

    (Since version 1.0-RC1) not used anymore

  3. def withWakeupDebug(wakeupDebug: Boolean): ConsumerSettings[K, V]

    Not used anymore

    Not used anymore

    Annotations
    @deprecated
    Deprecated

    (Since version 1.0-RC1) not used anymore

  4. def withWakeupTimeout(wakeupTimeout: Duration): ConsumerSettings[K, V]

    Java API: Not used anymore

    Java API: Not used anymore

    Annotations
    @deprecated
    Deprecated

    (Since version 1.0-RC1) not used anymore

  5. def withWakeupTimeout(wakeupTimeout: FiniteDuration): ConsumerSettings[K, V]

    Not used anymore

    Not used anymore

    Annotations
    @deprecated
    Deprecated

    (Since version 1.0-RC1) not used anymore

Inherited from AnyRef

Inherited from Any

Ungrouped