Settings object to set up messaging

Param

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

Param

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

Param

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

Param

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

Param

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

Param

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

Param

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).

Param

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.

Hierarchy

  • MessagingBrokerSettings

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, vhostName) => BrokerConfig)

Type declaration

    • (config, vhostName): BrokerConfig
    • Customizations on the generated rascal configuration for queues, bindinges, ...

      Parameters

      • config: BrokerConfig

        The configuration object created based on the builders.

      • vhostName: string

      Returns BrokerConfig

      The adjusted configuration object

      Params

      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.

Generated using TypeDoc