o

cakesolutions.kafka

KafkaProducerRecord

object KafkaProducerRecord

Helper functions for creating Kafka's ProducerRecords.

The producer records hold the data that is to be written to Kafka. The producer records are compatible with Kafka's own KafkaProducer and the KafkaProducer in this library.

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

Type Members

  1. final case class Destination(topic: Topic, partition: Option[Partition]) extends Product with Serializable

    Destination for Kafka producer records.

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. def apply[Key >: Null, Value](topicPartitionSelection: Destination, key: Option[Key] = None, value: Value, timestamp: Option[Long] = None): ProducerRecord[Key, Value]

    Create a producer record from a topic selection, optional key, value, and optional timestamp.

    Create a producer record from a topic selection, optional key, value, and optional timestamp.

    Key

    type of the key

    Value

    type of the value

    topicPartitionSelection

    the topic (with optional partition) where the record will be appended to

    key

    the key that will be included in the record

    value

    the value that will be included in the record

    timestamp

    the timestamp of the record

    returns

    producer record

  5. def apply[Key, Value](topic: String, value: Value): ProducerRecord[Key, Value]

    Create a producer record without a key.

    Create a producer record without a key.

    Key

    type of the key

    Value

    type of the value

    topic

    topic to which record is being sent

    value

    the value that will be included in the record

    returns

    producer record

  6. def apply[Key, Value](topic: String, key: Key, value: Value): ProducerRecord[Key, Value]

    Create a producer record with topic, key, and value.

    Create a producer record with topic, key, and value.

    Key

    type of the key

    Value

    type of the value

    topic

    the topic where the record will be appended to

    key

    the key that will be included in the record

    value

    the value that will be included in the record

    returns

    producer record

  7. def apply[Key, Value](topic: String, key: Option[Key], value: Value): ProducerRecord[Key, Value]

    Create a producer record with an optional key.

    Create a producer record with an optional key.

    Key

    type of the key

    Value

    type of the value

    topic

    the topic where the record will be appended to

    key

    optional key that will be included in the record

    value

    the value that will be included in the record

    returns

    producer record

  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def fromKeyValues[Key, Value](topic: String, keyValues: Seq[(Option[Key], Value)]): Seq[ProducerRecord[Key, Value]]

    Create producer records from key-value pairs.

    Create producer records from key-value pairs. All the records will have the given topic.

    topic

    topic to write the records to

    keyValues

    a sequence of key and value pairs

  13. def fromKeyValuesWithTopic[Key, Value](keyValuesWithTopic: Iterable[(String, Option[Key], Value)]): Iterable[ProducerRecord[Key, Value]]

    Create producer records from topic, key, and value triples.

    Create producer records from topic, key, and value triples.

    keyValuesWithTopic

    a sequence of topic, key, and value triples.

  14. def fromValues[Value](topic: String, values: Seq[Value]): Seq[ProducerRecord[Nothing, Value]]

    Create producer records from a sequence of values.

    Create producer records from a sequence of values. All the records will have the given topic and no key.

    topic

    topic to write the records to

    values

    values of the records

  15. def fromValuesWithKey[Key, Value](topic: String, key: Option[Key], values: Seq[Value]): Seq[ProducerRecord[Key, Value]]

    Create producer records from a single key and multiple values.

    Create producer records from a single key and multiple values. All the records will have the given topic and key.

    topic

    topic to write the records to

    key

    key of the records

    values

    values of the records

  16. def fromValuesWithTopic[Value](valuesWithTopic: Seq[(String, Value)]): Seq[ProducerRecord[Nothing, Value]]

    Create producer records from topics and values.

    Create producer records from topics and values. All the records will have no key.

    valuesWithTopic

    a sequence of topic and value pairs

  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. object Destination extends Serializable

    Destination for Kafka producer records.

Deprecated Value Members

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

Inherited from AnyRef

Inherited from Any

Ungrouped