Packages

final class KafkaServer extends AnyRef

A startable Kafka and Zookeeper server. Kafka and ZookeeperPort is generated by default.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KafkaServer
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new KafkaServer(kafkaPort: Int = KafkaServer.randomAvailablePort(), zookeeperPort: Int = KafkaServer.randomAvailablePort(), kafkaConfig: Map[String, String] = KafkaServer.defaultConfig)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from KafkaServer toany2stringadd[KafkaServer] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (KafkaServer, B)
    Implicit
    This member is added by an implicit conversion from KafkaServer toArrowAssoc[KafkaServer] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. def close(): Unit
  9. def consume[Key, Value](topic: String, expectedNumOfRecords: Int, timeout: Long, keyDeserializer: Deserializer[Key], valueDeserializer: Deserializer[Value], consumerConfig: Map[String, String] = defaultConsumerConfig): Seq[(Option[Key], Value)]

    Consume records from Kafka synchronously.

    Consume records from Kafka synchronously.

    Calling this function block the function call for a given amount of time or until expected number of records have been received from Kafka. Runtime exception is thrown if the consumer didn't receive expected amount of records.

    topic

    the topic to subscribe to

    expectedNumOfRecords

    maximum number of messages to read from Kafka

    timeout

    the duration in milliseconds for consuming messages

    keyDeserializer

    the deserializer for the record key

    valueDeserializer

    the deserializer for the record value

    consumerConfig

    custom configurations for Kafka consumer

    returns

    a sequence of key-value pairs received from Kafka

  10. def ensuring(cond: (KafkaServer) => Boolean, msg: => Any): KafkaServer
    Implicit
    This member is added by an implicit conversion from KafkaServer toEnsuring[KafkaServer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (KafkaServer) => Boolean): KafkaServer
    Implicit
    This member is added by an implicit conversion from KafkaServer toEnsuring[KafkaServer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: => Any): KafkaServer
    Implicit
    This member is added by an implicit conversion from KafkaServer toEnsuring[KafkaServer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): KafkaServer
    Implicit
    This member is added by an implicit conversion from KafkaServer toEnsuring[KafkaServer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from KafkaServer toStringFormat[KafkaServer] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  17. final def getClass(): Class[_ <: AnyRef]
    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. val kafkaPort: Int
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. def produce[Key, Value](records: Iterable[ProducerRecord[Key, Value]], keySerializer: Serializer[Key], valueSerializer: Serializer[Value], producerConfig: Map[String, String] = defaultProducerConfig): Unit

    Send records to Kafka synchronously.

    Send records to Kafka synchronously.

    Calling this function will block until all records have been successfully written to Kafka.

    records

    the records to write to Kafka

    keySerializer

    the serializer for the record key

    valueSerializer

    the serializer for the record value

    producerConfig

    custom configurations for Kafka producer

  25. def startup(): Unit
  26. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  31. val zookeeperPort: Int

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. def [B](y: B): (KafkaServer, B)
    Implicit
    This member is added by an implicit conversion from KafkaServer toArrowAssoc[KafkaServer] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromKafkaServer to any2stringadd[KafkaServer]

Inherited by implicit conversion StringFormat fromKafkaServer to StringFormat[KafkaServer]

Inherited by implicit conversion Ensuring fromKafkaServer to Ensuring[KafkaServer]

Inherited by implicit conversion ArrowAssoc fromKafkaServer to ArrowAssoc[KafkaServer]

Ungrouped