Axinom Mosaic Libraries
    Preparing search index...

    Interface MessagingBrokerSettings

    Settings object to set up messaging

    An express app that can store the instantiated broker to enable its retrieval using getMessagingBroker.

    A general RabbitMQ configuration object, needed by rascal to setup a RabbitMQ connection.

    An array of builders that will populate rascal config with message-specific configuration parts.

    A Mosaic logger instance that debug logs on messaging broker shutdown and error/debug log during message processing.

    ShutdownActionsMiddleware that will handle messaging broker shutdown when app is shut down.

    An array of middleware, each of which will be called when a message is received by subscription/message handler.

    An optional object used to create a rascal Broker instance. If it has a counter property - message redelivery will be enabled if the broker closes unexpectedly (e.g. due to an application crash).

    Relative path from project root to a folder where rascal config json will be saved to. Used for more convenient monitoring of messaging config changes during development. Disabled if value is not supplied or config.isDev is false.

    interface MessagingBrokerSettings {
        app?: MessagingRegistry;
        builders: RascalConfigBuilder[];
        components?: Record<string, unknown>;
        config: MessagingConfig;
        logger: Logger;
        onMessageMiddleware?: OnMessageMiddleware<unknown>[];
        rascalConfigExportPath?: string;
        rascalConfigPostProcessor?: (
            config: BrokerConfig,
            vhostName: string,
        ) => BrokerConfig;
        shutdownActions: ShutdownActionsMiddleware;
    }
    Index

    Properties

    An express app that can store the instantiated broker to enable its retrieval using getMessagingBroker.

    An array of builders that will populate rascal config with message-specific configuration parts.

    components?: Record<string, unknown>

    An optional object used to create a rascal Broker instance. If it has a counter property - message redelivery will be enabled if the broker closes unexpectedly (e.g. due to an application crash).

    A general RabbitMQ configuration object, needed by rascal to setup a RabbitMQ connection.

    logger: Logger

    A Mosaic logger instance that debug logs on messaging broker shutdown and error/debug log during message processing.

    onMessageMiddleware?: OnMessageMiddleware<unknown>[]

    An array of middleware, each of which will be called when a message is received by subscription/message handler.

    rascalConfigExportPath?: string

    Relative path from project root to a folder where rascal config json will be saved to. Used for more convenient monitoring of messaging config changes during development. Disabled if value is not supplied or config.isDev is false.

    rascalConfigPostProcessor?: (
        config: BrokerConfig,
        vhostName: string,
    ) => BrokerConfig

    Customizations on the generated rascal configuration for queues, bindinges, ...

    Type Declaration

      • (config: BrokerConfig, vhostName: string): BrokerConfig
      • Parameters

        • config: BrokerConfig

          The configuration object created based on the builders.

        • vhostName: string

        Returns BrokerConfig

        The adjusted configuration object

    vhostName The name of the vhost that the service is using.

    shutdownActions: ShutdownActionsMiddleware

    ShutdownActionsMiddleware that will handle messaging broker shutdown when app is shut down.