Packages

p

kafka4m

package kafka4m

The high-level API space for kafka consumers

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. kafka4m
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Package Members

  1. package admin
  2. package consumer
  3. package io
  4. package jmx
  5. package partitions
  6. package producer
  7. package util

Type Members

  1. type Bytes = Array[Byte]
  2. type Key = String
  3. type KeyValue = (Key, Bytes)

Value Members

  1. def adminTopic(config: Config): String

    config

    the root configuration

    returns

    the admin topic as per the config

  2. def byteArrayProducer[A](config: Config): RichKafkaProducer[Key, Bytes]
  3. def closeOnComplete(config: Config): Boolean

    config

    the kafka4m config

    returns

    true if observables should be closed when complete

  4. def consumerTopics(config: Config): Set[String]

    config

    the root configuration

    returns

    the consumer topic as per the config

  5. def continueOnError(config: Config): Boolean
  6. def ensureTopicBlocking(config: Config)(implicit ec: ExecutionContext): Option[String]

    Kafka Streams will fail if the topic does not yet exist.

    Kafka Streams will fail if the topic does not yet exist. This way we can provide a means to 'getOrCreate' a topic if that's how it's configured.

  7. def fireAndForget(config: Config): Boolean
  8. def kafkaConsumer(config: Config)(implicit scheduler: Scheduler): RichKafkaConsumer[String, Array[Byte]]

    config

    the kafka4m config

    returns

    A RichKafkaConsumer from the given kafka4m configuration

  9. def kafkaProducer[A, K, V](config: Config): RichKafkaProducer[K, V]

    config

    the kafka4m config

    returns

    a RichKafkaProducer for the given config

  10. def producerTopic(config: Config): String

    config

    the root configuration

    returns

    the producer topic as per the config

  11. def read(config: Config = ConfigFactory.load())(implicit scheduler: Scheduler): Observable[AckableRecord[ConsumerRecord[String, Array[Byte]]]]

    config

    the kafka4m configuration which contains the 'kafka4m.consumer' values

    returns

    an Observable of AckableRecords from kafka. The offsets, etc will be controlled by the kafka4m.consumer configuration, which includes default offset strategy, etc.

  12. def readRecords(config: Config = ConfigFactory.load())(implicit scheduler: Scheduler): Observable[ConsumerRecord[Key, Bytes]]

    config

    the kafka4m configuration which contains the 'kafka4m.consumer' values

    returns

    an Observable of data coming from kafka. The offsets, etc will be controlled by the kafka4m.consumer configuration, which includes default offset strategy, etc.

  13. def richAdmin(config: Config): RichKafkaAdmin
  14. def write[A](config: Config = ConfigFactory.load())(implicit ev: Aux[A, Key, Bytes]): Consumer[A, Long]

    A

    any type A which can be converted into a kafka ProducerRecord

    config

    the kafka4m configuration

    returns

    a consumer of the 'A' values and produce the number written

  15. def writeKeyAndBytes(config: Config = ConfigFactory.load()): Consumer[(String, Array[Byte]), Long]

    config

    the kafka4m configuration

    returns

    a consumer which will consume a stream of key/byte-array values into kafka and return the number written

  16. def writeText(config: Config = ConfigFactory.load()): Consumer[String, Long]

    config

    the kafka4m configuration

    returns

    a consumer which will consume raw text data and write it with null keys

  17. object Kafka4mApp extends ConfigApp with StrictLogging

    An ETL entry point to read data into or out of kafka

Inherited from AnyRef

Inherited from Any

Ungrouped