A builder class that builds various rascal config parts for a specific messageType. Multiple builders are used by setupMessagingBroker middleware to generate a complete rascal messaging configuration object.

Hierarchy

  • RascalConfigBuilder

Constructors

Properties

buildMessageHandler?: ((broker) => MessageHandler<unknown>)

Type declaration

    • (broker): MessageHandler<unknown>
    • There should not be any need to explicitly call this. This should only be used by setupMessagingBroker or any custom logic that is meant to setup broker and rascal subscriptions, if setupMessagingBroker is not used for some reason.

      Parameters

      Returns MessageHandler<unknown>

general RabbitMQ configuration object

currentServiceId: string
destinationServiceId: string

an info object that contains general information about message type

subscribedEventServiceId: undefined | string

Service ID of an event to which the service subscripbes to. Used by the cachePublicSigningKeys to request only relevant public keys from the Key Service.

Only set if subscribeForEvent is called on the builder.

transformers: ConfigTransformer = {}

Methods

  • Parameters

    Returns void

  • Parameters

    • serviceId: string
    • queueName: string

    Returns void

  • Parameters

    • type: MessageType
    • queueName: string
    • routingKey: string

    Returns void

  • Parameters

    • queueName: string

    Returns void

  • Parameters

    • queueName: string

    Returns void

  • There should not be any need to explicitly call this. This should only be used by setupMessagingBroker or any custom logic that is meant to generate broker config out of builders, if setupMessagingBroker is not used for some reason.

    Parameters

    • cfg: BrokerConfig

    Returns BrokerConfig

  • Returns string

  • Returns string

  • Returns string

  • Type Parameters

    • TContent

    Parameters

    Returns void

  • Builder extension method to build rascal configuration part to enable receiving commands for a specific messageType.

    Type Parameters

    • TContent

    Parameters

    • buildMessageHandler: ((broker) => MessageHandler<TContent>)

      Function that creates a MessageHandler instance using an instantiated broker. MessageHandler instance is used to create a rascal subscription, which will be calling the handlers onMessage method when receiving a message.

    Returns RascalConfigBuilder

  • Builder extension method to build rascal configuration part to enable receiving events for a specific messageType.

    Type Parameters

    • TContent

    Parameters

    • buildMessageHandler: ((broker) => MessageHandler<TContent>)

      Function that creates a MessageHandler instance using an instantiated broker. MessageHandler instance is used to create a rascal subscription, which will be calling the handlers onMessage method when receiving a message.

    Returns RascalConfigBuilder

  • Returns an object with default arguments which queues are created with.

    Parameters

    • serviceId: string

      id of the service to which queue will belong to. Used to define dead letter routing key.

    Returns Record<string, string>

Generated using TypeDoc