object Conf extends Serializable
Utilities for creating Kafka consumer configurations.
- Alphabetic
- By Inheritance
- Conf
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[K, V](config: Config, keyDeserializer: Deserializer[K], valueDeserializer: Deserializer[V]): Conf[K, V]
Creates a Kafka consumer configuration from a Typesafe config.
Creates a Kafka consumer configuration from a Typesafe config.
The configuration names and values must match the Kafka's
ConsumerConfigstyle.- K
key deserialiser type
- V
value deserialiser type
- config
a Typesafe config to build configuration from
- keyDeserializer
deserialiser for the key
- valueDeserializer
deserialiser for the value
- returns
consumer configuration
-
def
apply[K, V](keyDeserializer: Deserializer[K], valueDeserializer: Deserializer[V], bootstrapServers: String = "localhost:9092", groupId: String, enableAutoCommit: Boolean = true, autoCommitInterval: Int = 1000, sessionTimeoutMs: Int = 10000, maxPartitionFetchBytes: Int = ..., maxPollRecords: Int = 500, maxPollInterval: Int = 300000, maxMetaDataAge: Long = 300000, autoOffsetReset: OffsetResetStrategy = OffsetResetStrategy.LATEST, isolationLevel: IsolationLevel = IsolationLevel.READ_UNCOMMITTED): Conf[K, V]
Kafka consumer configuration constructor with common configurations as parameters.
Kafka consumer configuration constructor with common configurations as parameters. For more detailed configuration, use the other Conf constructors.
- K
key deserialiser type
- V
value deserialiser type
- keyDeserializer
deserializer for the key
- valueDeserializer
deserializer for the value
- bootstrapServers
a list of host/port pairs to use for establishing the initial connection to the Kafka cluster
- groupId
a unique string that identifies the consumer group this consumer belongs to
- enableAutoCommit
if true the consumer's offsets will be periodically committed in the background
- autoCommitInterval
the frequency in milliseconds that the consumer offsets are auto-committed to Kafka when auto commit is enabled
- sessionTimeoutMs
the timeout used to detect failures when using Kafka's group management facilities
- maxPartitionFetchBytes
the maximum amount of data per-partition the server will return
- maxPollRecords
the maximum number of records returned in a single call to poll()
- maxPollInterval
the maximum delay between invocations of poll() when using consumer group management
- maxMetaDataAge
period of time in milliseconds after which we force a refresh of metadata even if we haven't seen any partition leadership changes to proactively discover any new brokers or partitions
- autoOffsetReset
what to do when there is no initial offset in Kafka or if the current offset does not exist any more on the server
- returns
consumer configuration consisting of all the given values
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )