class ConsumerSettings[K, V] extends AnyRef

Settings for consumers. See pekko.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. Protected

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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. val closeTimeout: FiniteDuration
  7. val commitRefreshInterval: Duration
  8. val commitTimeWarning: FiniteDuration
  9. val commitTimeout: FiniteDuration
  10. val connectionCheckerSettings: ConnectionCheckerSettings
  11. val consumerFactory: (ConsumerSettings[K, V]) => Consumer[K, V]
  12. def createKafkaConsumer(): Consumer[K, V]

    Create a Kafka Consumer instance from these settings.

    Create a Kafka Consumer instance from these settings.

    This will fail with IllegalStateException if asynchronous enrichment is set up -- always prefer createKafkaConsumerAsync() or createKafkaConsumerCompletionStage().

    Exceptions thrown

    IllegalStateException if asynchronous enrichment is set via withEnrichAsync or withEnrichCompletionStage, you must use createKafkaConsumerAsync or createKafkaConsumerCompletionStage to apply it

  13. def createKafkaConsumerAsync()(implicit executionContext: ExecutionContext): Future[Consumer[K, V]]

    Scala API.

    Scala API.

    Create a Kafka Consumer instance from these settings (without blocking for enriched).

  14. def createKafkaConsumerCompletionStage(executor: Executor): CompletionStage[Consumer[K, V]]

    Java API.

    Java API.

    Create a Kafka Consumer instance from these settings (without blocking for enriched).

  15. val dispatcher: String
  16. val drainingCheckInterval: FiniteDuration
  17. val enrichAsync: Option[(ConsumerSettings[K, V]) => Future[ConsumerSettings[K, V]]]
  18. def enriched: Future[ConsumerSettings[K, V]]

    Applies enrichAsync to complement these settings from asynchronous sources.

  19. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  21. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  22. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. def getCloseTimeout: Duration
  24. def getMetadataRequestTimeout: Duration
  25. def getOffsetForTimesTimeout: Duration
  26. def getPositionTimeout: Duration
  27. def getProperties: Map[String, AnyRef]

    Get the Kafka consumer settings as map.

  28. def getProperty(key: String): String

    Java API: Get a raw property.

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

  29. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. val keyDeserializerOpt: Option[Deserializer[K]]
  32. val metadataRequestTimeout: FiniteDuration
  33. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  34. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  35. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  36. val offsetForTimesTimeout: FiniteDuration
  37. val partitionHandlerWarning: FiniteDuration
  38. val pollInterval: FiniteDuration
  39. val pollTimeout: FiniteDuration
  40. val positionTimeout: FiniteDuration
  41. val properties: Map[String, String]
  42. val resetProtectionSettings: OffsetResetProtectionSettings
  43. val stopTimeout: FiniteDuration
  44. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  45. def toString(): String
    Definition Classes
    ConsumerSettings → AnyRef → Any
  46. val valueDeserializerOpt: Option[Deserializer[V]]
  47. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  48. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  49. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  50. val waitClosePartition: FiniteDuration
  51. 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.

  52. 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.

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

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

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

    Set duration to wait for KafkaConsumer.close to finish.

  55. 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

  56. 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

  57. 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 pekko.kafka.CommitTimeoutException.

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

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

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

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

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

    If commits take longer than this time a warning is logged

  61. def withConnectionChecker(kafkaConnectionCheckerConfig: ConnectionCheckerSettings): ConsumerSettings[K, V]

    Enable kafka connection checker with provided settings

  62. def withConsumerFactory(factory: (ConsumerSettings[K, V]) => Consumer[K, V]): ConsumerSettings[K, V]

    Replaces the default Kafka consumer creation logic.

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

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

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

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

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

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

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

  66. def withEnrichAsync(value: (ConsumerSettings[K, V]) => Future[ConsumerSettings[K, V]]): ConsumerSettings[K, V]

    Scala API.

    Scala API. A hook to allow for resolving some settings asynchronously.

    Since

    Alpakka Kafka 2.0.0

  67. def withEnrichCompletionStage(value: Function[ConsumerSettings[K, V], CompletionStage[ConsumerSettings[K, V]]]): ConsumerSettings[K, V]

    Java API.

    Java API. A hook to allow for resolving some settings asynchronously.

    Since

    Alpakka Kafka 2.0.0

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

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

  69. def withGroupInstanceId(groupInstanceId: String): ConsumerSettings[K, V]

    An id string that marks consumer as a unique static member of the consumer group.

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

    Java API

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

    Scala API

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

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

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

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

  74. def withPartitionHandlerWarning(partitionHandlerWarning: Duration): ConsumerSettings[K, V]

    Java API

  75. def withPartitionHandlerWarning(partitionHandlerWarning: FiniteDuration): ConsumerSettings[K, V]

    Scala API

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

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

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

    Set the interval from one scheduled poll to the next.

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

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

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

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

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

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

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

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

  82. 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.

  83. 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.

  84. 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.

  85. 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.

  86. def withResetProtectionSettings(resetProtection: OffsetResetProtectionSettings): ConsumerSettings[K, V]

    Set the protection for unintentional offset reset.

  87. 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.

  88. 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.

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped