OptionalappAn 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.
OptionalcomponentsAn 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.
A Mosaic logger instance that debug logs on messaging broker shutdown and error/debug log during message processing.
OptionalonAn array of middleware, each of which will be called when a message is received by subscription/message handler.
OptionalrascalRelative 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.
OptionalrascalCustomizations on the generated rascal configuration for queues, bindinges, ...
The configuration object created based on the builders.
The adjusted configuration object
ShutdownActionsMiddleware that will handle messaging broker shutdown when app is shut down.
Settings object to set up messaging
Param: app
An express app that can store the instantiated broker to enable its retrieval using
getMessagingBroker.Param: config
A general RabbitMQ configuration object, needed by rascal to setup a RabbitMQ connection.
Param: builders
An array of builders that will populate rascal config with message-specific configuration parts.
Param: logger
A Mosaic logger instance that debug logs on messaging broker shutdown and error/debug log during message processing.
Param: shutdownActions
ShutdownActionsMiddleware that will handle messaging broker shutdown when app is shut down.
Param: onMessageMiddleware
An array of middleware, each of which will be called when a message is received by subscription/message handler.
Param: components
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: rascalConfigExportPath
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.isDevis false.