Class/Object

monix.kafka

KafkaConsumerConfig

Related Docs: object KafkaConsumerConfig | package kafka

Permalink

final case class KafkaConsumerConfig(groupId: String, zookeeperConnect: String, consumerId: String, socketTimeout: FiniteDuration, socketReceiveBufferInBytes: Int, fetchMessageMaxBytes: Int, numConsumerFetchers: Int, autoCommitEnable: Boolean, autoCommitInterval: FiniteDuration, queuedMaxMessageChunks: Int, rebalanceMaxRetries: Int, fetchMinBytes: Int, fetchWaitMaxTime: FiniteDuration, rebalanceBackoffTime: FiniteDuration, refreshLeaderBackoffTime: FiniteDuration, autoOffsetReset: AutoOffsetReset, consumerTimeout: FiniteDuration, excludeInternalTopics: Boolean, partitionAssignmentStrategy: PartitionAssignmentStrategy, clientId: String, zookeeperSessionTimeout: FiniteDuration, zookeeperConnectionTimeout: FiniteDuration, zookeeperSyncTime: FiniteDuration, offsetsStorage: OffsetsStorage, offsetsChannelBackoffTime: FiniteDuration, offsetsChannelSocketTimeout: FiniteDuration, offsetsCommitMaxRetries: Int, dualCommitEnabled: Boolean) extends Product with Serializable

Configuration for Kafka Consumer.

For the official documentation on the available configuration options, see Consumer Configs on kafka.apache.org.

groupId

is the group.id setting, a unique string that identifies the consumer group this consumer belongs to.

zookeeperConnect

is the zookeeper.connect setting, a list of host/port pairs to use for establishing the initial connection to the Zookeeper cluster.

consumerId

is the consumer.id setting, a unique string that identifies the consumer (will be autogenerated if not set).

socketTimeout

is the socket.timeout.ms setting, the socket timeout for network requests.

socketReceiveBufferInBytes

is the socket.receive.buffer.bytes setting, the size of the socket receive buffer for network requests.

fetchMessageMaxBytes

is the fetch.message.max.bytes setting, the maximum amount of data per-partition the server will return.

numConsumerFetchers

is the num.consumer.fetchers setting, the number of fetcher threads to spawn.

autoCommitEnable

is the auto.commit.enable setting. If true the consumer's offset will be periodically committed in the background.

autoCommitInterval

is the auto.commit.interval.ms setting, the frequency of autocommits.

queuedMaxMessageChunks

is the queued.max.message.chunks setting, the maximum number of message chunks that consumer may buffer.

rebalanceMaxRetries

is the rebalance.max.retries setting, the number of attempts to rebalance the consumer group when a new consumer joins.

fetchMinBytes

is the fetch.min.bytes setting, the minimum amount of data the server should return for a fetch request.

fetchWaitMaxTime

is the fetch.wait.max.ms setting, the maximum amount of time the server will block before answering the fetch request if there isn't sufficient data to immediately satisfy the requirement given by fetch.min.bytes.

rebalanceBackoffTime

is the rebalance.backoff.m setting. The amount of time to wait before attempting to rebalance the consumer group.

refreshLeaderBackoffTime

is the refresh.leader.backoff.ms setting. The amount of time to wait before trying to elect a new leader for a consumer group that has lost one.

autoOffsetReset

is the auto.offset.reset setting, specifying what to do when there is no initial offset in Kafka or if the current offset does not exist any more on the server (e.g. because that data has been deleted).

consumerTimeout

is the consumer.timeout.ms setting, which specifies the amount of time to wait before throwing an exception when there's nothing to consume.

excludeInternalTopics

is the exclude.internal.topics setting. Whether records from internal topics (such as offsets) should be exposed to the consumer. If set to true the only way to receive records from an internal topic is subscribing to it.

partitionAssignmentStrategy

is the partition.assignment.strategy setting, which chooses how partitions will be assigned to consumer streams (range or roundrobin). Note that roundrobin strategy results in a more even load distribution, but will not work when consuming from multiple topics.

clientId

is the client.id setting, 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.

zookeeperSessionTimeout

is the zookeeper.session.timeout.ms setting, the maximum amount of time to wait for a heartbeat before initiating a rebalance.

zookeeperConnectionTimeout

is the zookeeper.connection.timeout.ms setting, the maximum amount of time the client will wait to establish a connection to ZooKeeper.

zookeeperSyncTime

is the zookeeper.sync.time.ms setting, the maximum lag allowed for ZK followers.

offsetsStorage

is the offsets.storage setting, that controls where offsets are stored (zookeeper or kafka).

offsetsChannelBackoffTime

is the offsets.channel.backoff.ms setting, the backoff period when reconnecting the offsets channel or retrying failed offset fetch/commit requests.

offsetsChannelSocketTimeout

is the offsets.channel.socket.timeout.ms setting. Socket timeout when reading responses for offset fetch/commit requests.

offsetsCommitMaxRetries

is the offsets.commit.max.retries setting, The maximum amount of retries for commiting the offset. This retry count only applies to offset commits during shut-down. It does not apply to commits originating from the auto-commit thread.

dualCommitEnabled

is the dual.commit.enabled setting, which can be used to dual commit offsets to ZooKeeper if using kafka as offsets.storage. This is required during migration from ZooKeeper-based offset storage to Kafka-based offset storage.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KafkaConsumerConfig
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KafkaConsumerConfig(groupId: String, zookeeperConnect: String, consumerId: String, socketTimeout: FiniteDuration, socketReceiveBufferInBytes: Int, fetchMessageMaxBytes: Int, numConsumerFetchers: Int, autoCommitEnable: Boolean, autoCommitInterval: FiniteDuration, queuedMaxMessageChunks: Int, rebalanceMaxRetries: Int, fetchMinBytes: Int, fetchWaitMaxTime: FiniteDuration, rebalanceBackoffTime: FiniteDuration, refreshLeaderBackoffTime: FiniteDuration, autoOffsetReset: AutoOffsetReset, consumerTimeout: FiniteDuration, excludeInternalTopics: Boolean, partitionAssignmentStrategy: PartitionAssignmentStrategy, clientId: String, zookeeperSessionTimeout: FiniteDuration, zookeeperConnectionTimeout: FiniteDuration, zookeeperSyncTime: FiniteDuration, offsetsStorage: OffsetsStorage, offsetsChannelBackoffTime: FiniteDuration, offsetsChannelSocketTimeout: FiniteDuration, offsetsCommitMaxRetries: Int, dualCommitEnabled: Boolean)

    Permalink

    groupId

    is the group.id setting, a unique string that identifies the consumer group this consumer belongs to.

    zookeeperConnect

    is the zookeeper.connect setting, a list of host/port pairs to use for establishing the initial connection to the Zookeeper cluster.

    consumerId

    is the consumer.id setting, a unique string that identifies the consumer (will be autogenerated if not set).

    socketTimeout

    is the socket.timeout.ms setting, the socket timeout for network requests.

    socketReceiveBufferInBytes

    is the socket.receive.buffer.bytes setting, the size of the socket receive buffer for network requests.

    fetchMessageMaxBytes

    is the fetch.message.max.bytes setting, the maximum amount of data per-partition the server will return.

    numConsumerFetchers

    is the num.consumer.fetchers setting, the number of fetcher threads to spawn.

    autoCommitEnable

    is the auto.commit.enable setting. If true the consumer's offset will be periodically committed in the background.

    autoCommitInterval

    is the auto.commit.interval.ms setting, the frequency of autocommits.

    queuedMaxMessageChunks

    is the queued.max.message.chunks setting, the maximum number of message chunks that consumer may buffer.

    rebalanceMaxRetries

    is the rebalance.max.retries setting, the number of attempts to rebalance the consumer group when a new consumer joins.

    fetchMinBytes

    is the fetch.min.bytes setting, the minimum amount of data the server should return for a fetch request.

    fetchWaitMaxTime

    is the fetch.wait.max.ms setting, the maximum amount of time the server will block before answering the fetch request if there isn't sufficient data to immediately satisfy the requirement given by fetch.min.bytes.

    rebalanceBackoffTime

    is the rebalance.backoff.m setting. The amount of time to wait before attempting to rebalance the consumer group.

    refreshLeaderBackoffTime

    is the refresh.leader.backoff.ms setting. The amount of time to wait before trying to elect a new leader for a consumer group that has lost one.

    autoOffsetReset

    is the auto.offset.reset setting, specifying what to do when there is no initial offset in Kafka or if the current offset does not exist any more on the server (e.g. because that data has been deleted).

    consumerTimeout

    is the consumer.timeout.ms setting, which specifies the amount of time to wait before throwing an exception when there's nothing to consume.

    excludeInternalTopics

    is the exclude.internal.topics setting. Whether records from internal topics (such as offsets) should be exposed to the consumer. If set to true the only way to receive records from an internal topic is subscribing to it.

    partitionAssignmentStrategy

    is the partition.assignment.strategy setting, which chooses how partitions will be assigned to consumer streams (range or roundrobin). Note that roundrobin strategy results in a more even load distribution, but will not work when consuming from multiple topics.

    clientId

    is the client.id setting, 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.

    zookeeperSessionTimeout

    is the zookeeper.session.timeout.ms setting, the maximum amount of time to wait for a heartbeat before initiating a rebalance.

    zookeeperConnectionTimeout

    is the zookeeper.connection.timeout.ms setting, the maximum amount of time the client will wait to establish a connection to ZooKeeper.

    zookeeperSyncTime

    is the zookeeper.sync.time.ms setting, the maximum lag allowed for ZK followers.

    offsetsStorage

    is the offsets.storage setting, that controls where offsets are stored (zookeeper or kafka).

    offsetsChannelBackoffTime

    is the offsets.channel.backoff.ms setting, the backoff period when reconnecting the offsets channel or retrying failed offset fetch/commit requests.

    offsetsChannelSocketTimeout

    is the offsets.channel.socket.timeout.ms setting. Socket timeout when reading responses for offset fetch/commit requests.

    offsetsCommitMaxRetries

    is the offsets.commit.max.retries setting, The maximum amount of retries for commiting the offset. This retry count only applies to offset commits during shut-down. It does not apply to commits originating from the auto-commit thread.

    dualCommitEnabled

    is the dual.commit.enabled setting, which can be used to dual commit offsets to ZooKeeper if using kafka as offsets.storage. This is required during migration from ZooKeeper-based offset storage to Kafka-based offset storage.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val autoCommitEnable: Boolean

    Permalink

    is the auto.commit.enable setting.

    is the auto.commit.enable setting. If true the consumer's offset will be periodically committed in the background.

  6. val autoCommitInterval: FiniteDuration

    Permalink

    is the auto.commit.interval.ms setting, the frequency of autocommits.

  7. val autoOffsetReset: AutoOffsetReset

    Permalink

    is the auto.offset.reset setting, specifying what to do when there is no initial offset in Kafka or if the current offset does not exist any more on the server (e.g.

    is the auto.offset.reset setting, specifying what to do when there is no initial offset in Kafka or if the current offset does not exist any more on the server (e.g. because that data has been deleted).

  8. val clientId: String

    Permalink

    is the client.id setting, an id string to pass to the server when making requests.

    is the client.id setting, 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.

  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. val consumerId: String

    Permalink

    is the consumer.id setting, a unique string that identifies the consumer (will be autogenerated if not set).

  11. val consumerTimeout: FiniteDuration

    Permalink

    is the consumer.timeout.ms setting, which specifies the amount of time to wait before throwing an exception when there's nothing to consume.

  12. val dualCommitEnabled: Boolean

    Permalink

    is the dual.commit.enabled setting, which can be used to dual commit offsets to ZooKeeper if using kafka as offsets.storage.

    is the dual.commit.enabled setting, which can be used to dual commit offsets to ZooKeeper if using kafka as offsets.storage. This is required during migration from ZooKeeper-based offset storage to Kafka-based offset storage.

  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. val excludeInternalTopics: Boolean

    Permalink

    is the exclude.internal.topics setting.

    is the exclude.internal.topics setting. Whether records from internal topics (such as offsets) should be exposed to the consumer. If set to true the only way to receive records from an internal topic is subscribing to it.

  15. val fetchMessageMaxBytes: Int

    Permalink

    is the fetch.message.max.bytes setting, the maximum amount of data per-partition the server will return.

  16. val fetchMinBytes: Int

    Permalink

    is the fetch.min.bytes setting, the minimum amount of data the server should return for a fetch request.

  17. val fetchWaitMaxTime: FiniteDuration

    Permalink

    is the fetch.wait.max.ms setting, the maximum amount of time the server will block before answering the fetch request if there isn't sufficient data to immediately satisfy the requirement given by fetch.min.bytes.

  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. val groupId: String

    Permalink

    is the group.id setting, a unique string that identifies the consumer group this consumer belongs to.

  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. val numConsumerFetchers: Int

    Permalink

    is the num.consumer.fetchers setting, the number of fetcher threads to spawn.

  26. val offsetsChannelBackoffTime: FiniteDuration

    Permalink

    is the offsets.channel.backoff.ms setting, the backoff period when reconnecting the offsets channel or retrying failed offset fetch/commit requests.

  27. val offsetsChannelSocketTimeout: FiniteDuration

    Permalink

    is the offsets.channel.socket.timeout.ms setting.

    is the offsets.channel.socket.timeout.ms setting. Socket timeout when reading responses for offset fetch/commit requests.

  28. val offsetsCommitMaxRetries: Int

    Permalink

    is the offsets.commit.max.retries setting, The maximum amount of retries for commiting the offset.

    is the offsets.commit.max.retries setting, The maximum amount of retries for commiting the offset. This retry count only applies to offset commits during shut-down. It does not apply to commits originating from the auto-commit thread.

  29. val offsetsStorage: OffsetsStorage

    Permalink

    is the offsets.storage setting, that controls where offsets are stored (zookeeper or kafka).

  30. val partitionAssignmentStrategy: PartitionAssignmentStrategy

    Permalink

    is the partition.assignment.strategy setting, which chooses how partitions will be assigned to consumer streams (range or roundrobin).

    is the partition.assignment.strategy setting, which chooses how partitions will be assigned to consumer streams (range or roundrobin). Note that roundrobin strategy results in a more even load distribution, but will not work when consuming from multiple topics.

  31. val queuedMaxMessageChunks: Int

    Permalink

    is the queued.max.message.chunks setting, the maximum number of message chunks that consumer may buffer.

  32. val rebalanceBackoffTime: FiniteDuration

    Permalink

    is the rebalance.backoff.m setting.

    is the rebalance.backoff.m setting. The amount of time to wait before attempting to rebalance the consumer group.

  33. val rebalanceMaxRetries: Int

    Permalink

    is the rebalance.max.retries setting, the number of attempts to rebalance the consumer group when a new consumer joins.

  34. val refreshLeaderBackoffTime: FiniteDuration

    Permalink

    is the refresh.leader.backoff.ms setting.

    is the refresh.leader.backoff.ms setting. The amount of time to wait before trying to elect a new leader for a consumer group that has lost one.

  35. val socketReceiveBufferInBytes: Int

    Permalink

    is the socket.receive.buffer.bytes setting, the size of the socket receive buffer for network requests.

  36. val socketTimeout: FiniteDuration

    Permalink

    is the socket.timeout.ms setting, the socket timeout for network requests.

  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. def toMap: Map[String, String]

    Permalink
  39. def toProperties: Properties

    Permalink
  40. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. val zookeeperConnect: String

    Permalink

    is the zookeeper.connect setting, a list of host/port pairs to use for establishing the initial connection to the Zookeeper cluster.

  44. val zookeeperConnectionTimeout: FiniteDuration

    Permalink

    is the zookeeper.connection.timeout.ms setting, the maximum amount of time the client will wait to establish a connection to ZooKeeper.

  45. val zookeeperSessionTimeout: FiniteDuration

    Permalink

    is the zookeeper.session.timeout.ms setting, the maximum amount of time to wait for a heartbeat before initiating a rebalance.

  46. val zookeeperSyncTime: FiniteDuration

    Permalink

    is the zookeeper.sync.time.ms setting, the maximum lag allowed for ZK followers.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped