Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ServerRMQ

Hierarchy

Implements

Index

Constructors

constructor

  • new ServerRMQ(options: RmqOptions["options"]): ServerRMQ

Properties

Protected channel

channel: any = null

Protected deserializer

deserializer: ConsumerDeserializer

Protected Readonly isGlobalPrefetchCount

isGlobalPrefetchCount: boolean

Protected Readonly logger

logger: Logger = new Logger(Server.name)

Protected Readonly messageHandlers

messageHandlers: Map<string, MessageHandler<any, any, any>> = new Map<string, MessageHandler>()

Protected Readonly options

options: RmqOptions["options"]

Protected Readonly prefetchCount

prefetchCount: number

Protected Readonly queue

queue: string

Protected Readonly queueOptions

queueOptions: any

Protected serializer

serializer: ConsumerSerializer

Protected server

server: any = null

Readonly transportId

transportId: RMQ = Transport.RMQ

Protected Readonly urls

urls: string[] | RmqUrl[]

Methods

addHandler

  • addHandler(pattern: any, callback: MessageHandler, isEventHandler?: boolean): void

close

  • close(): void

createClient

  • createClient<T>(): T

getHandlerByPattern

getHandlers

getOptionsProp

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

Protected getRouteFromPattern

  • getRouteFromPattern(pattern: string): string

Protected handleError

  • handleError(error: string): void

handleEvent

handleMessage

  • handleMessage(message: Record<string, any>, channel: any): Promise<void>

Protected initializeDeserializer

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

Protected initializeSerializer

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

listen

  • listen(callback: () => void): Promise<void>

Protected loadPackage

  • loadPackage<T>(name: string, ctx: string, loader?: Function): T

Protected normalizePattern

  • normalizePattern(pattern: MsPattern): string

send

  • send(stream$: Observable<any>, respond: (data: WritePacket) => void): Subscription

sendMessage

  • sendMessage<T>(message: T, replyTo: any, correlationId: string): void

setupChannel

  • setupChannel(channel: any, callback: Function): Promise<void>

start

  • start(callback?: () => void): Promise<void>

transformToObservable

  • transformToObservable<T>(resultOrDeferred: any): Observable<T>

Generated using TypeDoc