Interface HaredoInstance<E>
interface HaredoInstance<E extends ExtensionInterface = object> { emitter: TypedEventEmitter<HaredoEvents>; close(force?: boolean): Promise<void>; connect(): Promise<void>; exchange<T = unknown>( exchange: ExchangeInterface<T>, ): ExchangeChain<T> & IterateExtension<E["exchange"], ExchangeChain<T>>; exchange<T = unknown>( exchange: string, type: ExchangeType, parameters?: ExchangeParams, args?: ExchangeArguments, ): ExchangeChain<T> & IterateExtension<E["exchange"], ExchangeChain<T>>; queue<T = unknown>( queue: QueueInterface<T>, ): QueueChain<T> & IterateExtension<E["queue"], QueueChain<T>>; queue<T = unknown>( queue: string, params?: QueueParams, args?: QueueArguments, ): QueueChain<T> & IterateExtension<E["queue"], QueueChain<T>>;} Properties
Methods
close
close(force?: boolean): Promise<void>
Cancel all consumers, wait for callbacks to finish and close the connection to the broker.