Axinom Mosaic Libraries
    Preparing search index...

    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.

    Index

    Constructors

    Properties

    buildMessageHandler?: (broker: 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.

    general RabbitMQ configuration object

    currentServiceId: string
    destinationServiceId: string

    an info object that contains general information about message type

    subscribedEventServiceId: string | undefined

    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.

    Methods

    • 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

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

      Type Parameters

      • TContent

      Parameters

      • buildMessageHandler: (broker: 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: 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>