This client is based in the functionality of kafkajs for NodeJS. In the moment of implement the port, this library show some issues and not clear API about how the connection handshake and events are managed by the library, for this reason we decide to include an admin client in all the cases, even when we only want to stablish a consumer or producer.

Hierarchy (View Summary)

Constructors

Properties

Accessors

Methods

Constructors

  • Create an instance of a Kafka client configuration options

    Parameters

    • options: KafkaConfig

      Kafka client configuration options

    • interval: number = DEFAULT_CHECK_INTERVAL

      Period of health check interval

    Returns Client

Properties

options: KafkaConfig

Kafka Broker configuration options

Accessors

  • get state(): boolean
  • Overall client state

    Returns boolean

Methods

  • Emitted when admin client can collect the desired information

    Parameters

    • event: "healthy"
    • listener: () => void

    Returns this

  • Emitted when admin client can not collect the desired information

    Parameters

    • event: "unhealthy"
    • listener: (crash: Crash) => void

    Returns this

  • Emitted every time that admin client get metadata from brokers

    Parameters

    Returns this

  • Emitted when admin client has some problem getting the metadata from brokers

    Parameters

    • event: "error"
    • listener: (crash: Crash) => void

    Returns this