Packages

object KafkaClient

Source
KafkaClient.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KafkaClient
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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[F[_]](implicit instance: KafkaClient[F]): KafkaClient[F]
    Annotations
    @inline()
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def client[F[_]](ensemble: Set[BrokerAddress], protocol: protocol.kafka.ProtocolVersion.Value, clientName: String)(implicit arg0: Logger[F], arg1: Async[F], arg2: Network[F]): Resource[F, KafkaClient[F]]

    Build a stream, that when run will produce single kafka client.

    Build a stream, that when run will produce single kafka client.

    Initially client spawns connections to nodes specified in ensemble and queries them for the topology. After topology is known, it then initiates connection to each Kafka Broker listed in topology. That connection is then used to publish messages to topic/partition that given broker is leader of.

    For the subscription client always initiate separate connections to 'followers'. Only in such case there is no ISR (follower) available client initiate subscribe connection to 'leader'.

    Client automatically reacts and recovers from any topology changes that may occur in ensemble:

    • When the leader is changed, the publish requests goes to newly designated leader.
    • When follower dies, or changes its role as leader, then subsequent reads are sent to another follower, if available.
    ensemble

    Ensemble to connect to. Must not be empty.

    protocol

    Protocol that will be used for requests. This shall be lowest common protocol supported by all brokers.

    clientName

    Name of the client. Name is suffixed for different type of connections to broker:

    • initial-meta-rq : Initial connection to query all available brokers
    • control : Control connection where publish requests and maetadat requests are sent to
    • fetch: Connection where fetch requests are sent to.
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def mk[F[_]](ensemble: Set[BrokerAddress], protocol: protocol.kafka.ProtocolVersion.Value, clientName: String, queryOffsetTimeout: FiniteDuration = 10.seconds, getLeaderDelay: FiniteDuration = 3.seconds, brokerMetadataReadTimeout: Option[FiniteDuration] = Some(10.seconds), publishFailMaxAttempts: Int = 3)(implicit arg0: Logger[F], arg1: Async[F], arg2: Network[F]): Resource[F, KafkaClient[F]]

    ensemble

    Ensemble to connect to. Must not be empty.

    protocol

    Protocol that will be used for requests. This shall be lowest common protocol supported by all brokers.

    clientName

    Name of the client. Name is suffixed for different type of connections to broker:

    • initial-meta-rq : Initial connection to query all available brokers
    • control : Control connection where publish requests and metadata requests are sent to
    • fetch: Connection where fetch requests are sent to.
    queryOffsetTimeout

    Timeout to query any partition offset.

    getLeaderDelay

    How often re-query for leader if the leader is not known. Applies only for publish connections.

    brokerMetadataReadTimeout

    Maximum time we can take to read response from broker to a metadata request.

    publishFailMaxAttempts

    Max number of attempts when publish to a topic fails, this is usually caused by kafka leader change.

  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. object impl
    Attributes
    protected[kafka]

Deprecated Value Members

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

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped