Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ClientKafka

Hierarchy

Index

Constructors

constructor

  • new ClientKafka(options: KafkaOptions["options"]): ClientKafka

Properties

Protected brokers

brokers: string[] | BrokersFunction

Protected client

client: Kafka = null

Protected clientId

clientId: string

Protected consumer

consumer: Consumer = null

Protected consumerAssignments

consumerAssignments: {}

Type declaration

  • [key: string]: number[]

Protected deserializer

deserializer: ProducerDeserializer

Protected groupId

groupId: string

Protected logger

logger: Logger = new Logger(ClientKafka.name)

Protected Readonly options

options: KafkaOptions["options"]

Protected producer

producer: Producer = null

Protected responsePatterns

responsePatterns: string[] = []

Protected routingMap

routingMap: Map<string, Function> = new Map<string, Function>()

Protected serializer

serializer: ProducerSerializer

Methods

Protected assignPacketId

bindTopics

  • bindTopics(): Promise<void>

close

  • close(): Promise<void>

connect

Protected connect$

  • connect$(instance: any, errorEvent?: string, connectEvent?: string): Observable<any>

createClient

  • createClient<T>(): T

Protected createObserver

  • createObserver<T>(observer: Observer<T>): (packet: WritePacket) => void

createResponseCallback

  • createResponseCallback(): (payload: EachMessagePayload) => any

Protected dispatchEvent

emit

  • emit<TResult, TInput>(pattern: any, data: TInput): Observable<TResult>

Protected getOptionsProp

  • getOptionsProp<T, K>(obj: T, prop: K, defaultValue?: T[K]): T[K]

Protected getReplyTopicPartition

  • getReplyTopicPartition(topic: string): string

Protected getResponsePatternName

  • getResponsePatternName(pattern: string): string

Protected initializeDeserializer

  • initializeDeserializer(options: KafkaOptions["options"]): void

Protected initializeSerializer

  • initializeSerializer(options: KafkaOptions["options"]): void

Protected normalizePattern

  • normalizePattern(pattern: MsPattern): string

Protected publish

send

  • send<TResult, TInput>(pattern: any, data: TInput): Observable<TResult>

Protected setConsumerAssignments

subscribeToResponseOf

  • subscribeToResponseOf(pattern: any): void

Generated using TypeDoc