Class PgNotifyServer

Hierarchy

  • Server
    • PgNotifyServer

Implements

  • CustomTransportStrategy

Constructors

Properties

deserializer: ConsumerDeserializer
firstConnected: boolean
logger: LoggerService
loggerService: LoggerService
messageHandlers: Map<string, MessageHandler<any, any, any>>
serializer: ConsumerSerializer
subscriber: Subscriber<{ [channel: string]: any }>

Methods

  • Parameters

    • pattern: string | Record<string, any>
    • callback: MessageHandler<any, any, any>

    Returns void

  • Parameters

    • subscriber: Subscriber<{ [channel: string]: any }>

    Returns void

  • Returns void

  • Returns Promise<void>

  • Parameters

    Returns Subscriber<{ [channel: string]: any }>

  • Parameters

    • pattern: string

    Returns null | MessageHandler<any, any, any>

  • Returns Map<string, MessageHandler<any, any, any>>

  • Type Parameters

    • T extends undefined | {} | { deserializer?: Deserializer<any, any>; retryAttempts?: number; retryDelay?: number; serializer?: Serializer<any, any>; url?: string } & IORedisOptions | { authenticator?: any; debug?: boolean; deserializer?: Deserializer<any, any>; encoding?: string; headers?: Record<string, string>; ignoreClusterUpdates?: boolean; inboxPrefix?: string; maxPingOut?: number; maxReconnectAttempts?: number; name?: string; nkey?: any; noEcho?: boolean; noRandomize?: boolean; nonceSigner?: any; pass?: string; pedantic?: boolean; pingInterval?: number; preserveBuffers?: boolean; queue?: string; reconnect?: boolean; reconnectDelayHandler?: any; reconnectJitter?: number; reconnectJitterTLS?: number; reconnectTimeWait?: number; serializer?: Serializer<any, any>; servers?: string | string[]; timeout?: number; tls?: any; token?: string; tokenHandler?: any; useOldRequestStyle?: boolean; user?: string; userCreds?: any; userJWT?: string; verbose?: boolean; waitOnFirstConnect?: boolean; yieldTime?: number; [key: string]: any } | MqttClientOptions & { deserializer?: Deserializer<any, any>; serializer?: Serializer<any, any>; subscribeOptions?: { nl?: boolean; qos: QoS; rap?: boolean; rh?: number }; url?: string; userProperties?: Record<string, string | string[]> } | { channelOptions?: ChannelOptions; credentials?: any; keepalive?: { http2MaxPingStrikes?: number; http2MaxPingsWithoutData?: number; http2MinPingIntervalWithoutDataMs?: number; http2MinTimeBetweenPingsMs?: number; keepalivePermitWithoutCalls?: number; keepaliveTimeMs?: number; keepaliveTimeoutMs?: number }; loader?: { alternateCommentMode?: boolean; arrays?: boolean; bytes?: Function; defaults?: boolean; enums?: Function; includeDirs?: string[]; json?: boolean; keepCase?: boolean; longs?: Function; objects?: boolean; oneofs?: boolean }; maxMetadataSize?: number; maxReceiveMessageLength?: number; maxSendMessageLength?: number; package: string | string[]; packageDefinition?: any; protoLoader?: string; protoPath: string | string[]; url?: string } | { client?: KafkaConfig; consumer?: ConsumerConfig; deserializer?: Deserializer<any, any>; parser?: KafkaParserConfig; postfixId?: string; producer?: ProducerConfig; producerOnlyMode?: boolean; run?: Omit<ConsumerRunConfig, "eachBatch" | "eachMessage">; send?: Omit<ProducerRecord, "topic" | "messages">; serializer?: Serializer<any, any>; subscribe?: Omit<ConsumerSubscribeTopic, "topic"> } | { deserializer?: Deserializer<any, any>; headers?: Record<string, string>; isGlobalPrefetchCount?: boolean; noAck?: boolean; persistent?: boolean; prefetchCount?: number; queue?: string; queueOptions?: any; replyQueue?: string; serializer?: Serializer<any, any>; socketOptions?: any; urls?: string[] | RmqUrl[] } | { deserializer?: Deserializer<any, any>; host?: string; port?: number; retryAttempts?: number; retryDelay?: number; serializer?: Serializer<any, any>; socketClass?: Type<TcpSocket> }

    • K extends string | number | symbol

    Parameters

    • obj: T
    • prop: K
    • Optional defaultValue: T[K]

    Returns T[K]

  • Parameters

    • pattern: string
    • id: string

    Returns ((response: any) => Promise<any>)

      • (response: any): Promise<any>
      • Parameters

        • response: any

        Returns Promise<any>

  • Transforms the server Pattern to valid type and returns a route for him.

    Returns

    string

    Parameters

    • pattern: string

      server pattern

    Returns string

  • Parameters

    Returns Promise<void>

  • Parameters

    Returns Promise<Subscription>

  • Parameters

    • error: string

    Returns void

  • Parameters

    • pattern: string
    • packet: ReadPacket<any>
    • context: BaseRpcContext<unknown[]>

    Returns Promise<any>

  • Parameters

    • options: undefined | { deserializer?: Deserializer<any, any>; retryAttempts?: number; retryDelay?: number; serializer?: Serializer<any, any>; url?: string } & IORedisOptions | { authenticator?: any; debug?: boolean; deserializer?: Deserializer<any, any>; encoding?: string; headers?: Record<string, string>; ignoreClusterUpdates?: boolean; inboxPrefix?: string; maxPingOut?: number; maxReconnectAttempts?: number; name?: string; nkey?: any; noEcho?: boolean; noRandomize?: boolean; nonceSigner?: any; pass?: string; pedantic?: boolean; pingInterval?: number; preserveBuffers?: boolean; queue?: string; reconnect?: boolean; reconnectDelayHandler?: any; reconnectJitter?: number; reconnectJitterTLS?: number; reconnectTimeWait?: number; serializer?: Serializer<any, any>; servers?: string | string[]; timeout?: number; tls?: any; token?: string; tokenHandler?: any; useOldRequestStyle?: boolean; user?: string; userCreds?: any; userJWT?: string; verbose?: boolean; waitOnFirstConnect?: boolean; yieldTime?: number; [key: string]: any } | MqttClientOptions & { deserializer?: Deserializer<any, any>; serializer?: Serializer<any, any>; subscribeOptions?: { nl?: boolean; qos: QoS; rap?: boolean; rh?: number }; url?: string; userProperties?: Record<string, string | string[]> } | { channelOptions?: ChannelOptions; credentials?: any; keepalive?: { http2MaxPingStrikes?: number; http2MaxPingsWithoutData?: number; http2MinPingIntervalWithoutDataMs?: number; http2MinTimeBetweenPingsMs?: number; keepalivePermitWithoutCalls?: number; keepaliveTimeMs?: number; keepaliveTimeoutMs?: number }; loader?: { alternateCommentMode?: boolean; arrays?: boolean; bytes?: Function; defaults?: boolean; enums?: Function; includeDirs?: string[]; json?: boolean; keepCase?: boolean; longs?: Function; objects?: boolean; oneofs?: boolean }; maxMetadataSize?: number; maxReceiveMessageLength?: number; maxSendMessageLength?: number; package: string | string[]; packageDefinition?: any; protoLoader?: string; protoPath: string | string[]; url?: string } | { client?: KafkaConfig; consumer?: ConsumerConfig; deserializer?: Deserializer<any, any>; parser?: KafkaParserConfig; postfixId?: string; producer?: ProducerConfig; producerOnlyMode?: boolean; run?: Omit<ConsumerRunConfig, "eachBatch" | "eachMessage">; send?: Omit<ProducerRecord, "topic" | "messages">; serializer?: Serializer<any, any>; subscribe?: Omit<ConsumerSubscribeTopic, "topic"> } | { deserializer?: Deserializer<any, any>; host?: string; port?: number; serializer?: Serializer<any, any>; socketClass?: Type<TcpSocket> } | { deserializer?: Deserializer<any, any>; headers?: Record<string, string>; isGlobalPrefetchCount?: boolean; noAck?: boolean; persistent?: boolean; prefetchCount?: number; queue?: string; queueOptions?: any; replyQueue?: string; serializer?: Serializer<any, any>; socketOptions?: any; urls?: string[] | RmqUrl[] }

    Returns void

  • Parameters

    • options: undefined | { deserializer?: Deserializer<any, any>; retryAttempts?: number; retryDelay?: number; serializer?: Serializer<any, any>; url?: string } & IORedisOptions | { authenticator?: any; debug?: boolean; deserializer?: Deserializer<any, any>; encoding?: string; headers?: Record<string, string>; ignoreClusterUpdates?: boolean; inboxPrefix?: string; maxPingOut?: number; maxReconnectAttempts?: number; name?: string; nkey?: any; noEcho?: boolean; noRandomize?: boolean; nonceSigner?: any; pass?: string; pedantic?: boolean; pingInterval?: number; preserveBuffers?: boolean; queue?: string; reconnect?: boolean; reconnectDelayHandler?: any; reconnectJitter?: number; reconnectJitterTLS?: number; reconnectTimeWait?: number; serializer?: Serializer<any, any>; servers?: string | string[]; timeout?: number; tls?: any; token?: string; tokenHandler?: any; useOldRequestStyle?: boolean; user?: string; userCreds?: any; userJWT?: string; verbose?: boolean; waitOnFirstConnect?: boolean; yieldTime?: number; [key: string]: any } | MqttClientOptions & { deserializer?: Deserializer<any, any>; serializer?: Serializer<any, any>; subscribeOptions?: { nl?: boolean; qos: QoS; rap?: boolean; rh?: number }; url?: string; userProperties?: Record<string, string | string[]> } | { channelOptions?: ChannelOptions; credentials?: any; keepalive?: { http2MaxPingStrikes?: number; http2MaxPingsWithoutData?: number; http2MinPingIntervalWithoutDataMs?: number; http2MinTimeBetweenPingsMs?: number; keepalivePermitWithoutCalls?: number; keepaliveTimeMs?: number; keepaliveTimeoutMs?: number }; loader?: { alternateCommentMode?: boolean; arrays?: boolean; bytes?: Function; defaults?: boolean; enums?: Function; includeDirs?: string[]; json?: boolean; keepCase?: boolean; longs?: Function; objects?: boolean; oneofs?: boolean }; maxMetadataSize?: number; maxReceiveMessageLength?: number; maxSendMessageLength?: number; package: string | string[]; packageDefinition?: any; protoLoader?: string; protoPath: string | string[]; url?: string } | { client?: KafkaConfig; consumer?: ConsumerConfig; deserializer?: Deserializer<any, any>; parser?: KafkaParserConfig; postfixId?: string; producer?: ProducerConfig; producerOnlyMode?: boolean; run?: Omit<ConsumerRunConfig, "eachBatch" | "eachMessage">; send?: Omit<ProducerRecord, "topic" | "messages">; serializer?: Serializer<any, any>; subscribe?: Omit<ConsumerSubscribeTopic, "topic"> } | { deserializer?: Deserializer<any, any>; host?: string; port?: number; serializer?: Serializer<any, any>; socketClass?: Type<TcpSocket> } | { deserializer?: Deserializer<any, any>; headers?: Record<string, string>; isGlobalPrefetchCount?: boolean; noAck?: boolean; persistent?: boolean; prefetchCount?: number; queue?: string; queueOptions?: any; replyQueue?: string; serializer?: Serializer<any, any>; socketOptions?: any; urls?: string[] | RmqUrl[] }

    Returns void

  • Parameters

    • callback: (() => void)
        • (): void
        • Returns void

    Returns Promise<void>

  • Returns Promise<void>

  • Type Parameters

    • T = any

    Parameters

    • name: string
    • ctx: string
    • Optional loader: Function

    Returns T

  • Parameters

    • pattern: MsPattern

    Returns string

  • Parameters

    • payload: any

    Returns { data: any; id?: string }

    • data: any
    • Optional id?: string
  • Parameters

    • stream$: Observable<any>
    • respond: ((data: WritePacket<any>) => unknown)
        • (data: WritePacket<any>): unknown
        • Parameters

          • data: WritePacket<any>

          Returns unknown

    Returns Subscription

  • Type Parameters

    • T

    Parameters

    • resultOrDeferred: Observable<T> | Promise<T>

    Returns Observable<T>

  • Type Parameters

    • T

    Parameters

    • resultOrDeferred: T

    Returns Observable<T>

Generated using TypeDoc