跳到主要内容
版本:Next

KafkaProducerFactory

Hierarchy

  • ServiceFactory<Producer>
    • KafkaProducerFactory

Index

Constructors

constructor

Properties

logger

logger: ILogger

pubConfig

pubConfig: ServiceFactoryConfigOption<IMidwayKafkaProducerInitOptions>

Methods

createInstance

  • createInstance(config: any, clientName?: any): Promise<Producer>

destroy

  • destroy(): Promise<void>

destroyClient

  • destroyClient(producer: Producer, name: string): Promise<void>

get

  • get<U>(id?: string): U
  • Type parameters

    • U = Producer

getClientKeys

  • getClientKeys(): string[]

getClientPriority

  • getClientPriority(name: string): string

getClients

  • getClients(): Map<string, Producer>

getDefaultClientName

  • getDefaultClientName(): string

getName

  • getName(): string

has

  • has(id: string): boolean

init

  • init(): Promise<void>

isHighPriority

  • isHighPriority(name: string): boolean

isLowPriority

  • isLowPriority(name: string): boolean

isMediumPriority

  • isMediumPriority(name: string): boolean

stop

  • stop(): Promise<void>