Class RabbitMQPublisher

Hierarchy

  • BasePublisher<IEventLike>
    • RabbitMQPublisher

Implements

  • IPublisher

Constructors

Properties

_RESPONSE_EXCHANGE: string
_RESPONSE_QUEUE: string
_WORK_EXCHANGE: string
_activeInbound: AsyncMap<Message>
_distributor: Distributor<IEventLike>
_responseChannel: Channel
_responseConsumer: string
_responseMap: AsyncMap<ResponseWrapper<unknown>>
_status: StateTracker<ESState>
_uuid: string
_workChannel: Channel
_workQueueMap: Map<string, {
    consumerTag?: string;
    queueName: string;
}>

Map of Queues by domain

publisherOptions: IRabbitMQPublisherConfig
rabbitMQConnection: RabbitMQConnection
role: PublisherToken

Accessors

  • get _key(): string
  • Returns string

Methods

  • Parameters

    • event: IEventLike

    Returns Promise<void>

  • Parameters

    • responseKey: string

    Returns Promise<ResponseWrapper<unknown>>

  • Returns Promise<void>

  • Get specific configuration given the publisher role

    Type Parameters

    • T extends IPublisherConfig

    Returns T

  • Listen to the publisher asynchronously without interacting with publisher state

    Parameters

    • handlerFn: ((event: IEventLike) => void)
        • (event: IEventLike): void
        • Parameters

          • event: IEventLike

          Returns void

    Returns string

  • Returns Promise<void>

  • Parameters

    • eventString: string

    Returns IEventLike

  • Parameters

    • responseString: string

    Returns ResponseWrapper<unknown>

  • Parameters

    • event: IEventLike

    Returns IEventLike

  • Publish an event to the wider system

    Parameters

    • event: IEventLike

    Returns Promise<void>

  • Convert an existing event into JSON

    Parameters

    • event: IEventLike

    Returns string

  • Subscribe to the publisher as a worker.

    Parameters

    • handlerFn: ((event: IEventLike) => any)
        • (event: IEventLike): any
        • Parameters

          • event: IEventLike

          Returns any

    Returns string

  • Parameters

    • key: string

    Returns void

Generated using TypeDoc