Skip to main content
Version: 14.x

Configuration

In order to configure the service, a set of environment variables are adopted for describing basic service needs, alongside a main configuration file.

Environment Variables

VariableDescriptionDefault
LOG_LEVELthe maximum log level to emit. Accepted levels are trace|debug|info|warn|errorinfo
HTTP_PORTthe HTTP port on which kubernetes status routes and metrics are exposed3000
CONFIGURATION_FOLDERthe filepath to the folder under which configuration file is located<HOME>/.df/mongezium

Configuration File

The application needs a configuration file, named config.json, having the following structure with values using the secret_rs syntax:

{
"persistence": {
"url": "<secret-rs value>",
"dbName": "<optional database name to connect. if not defined, the connection string must contain the db name.>"
},
"stream": {
"consumer": {
// <string, secret_rs value> pair of properties that appear in the [librdkafka](https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md) used by consumer
// NOTE: bootstrap.servers MUST be set to the same value of the producer's one
...
},
"producer": {
// <string, secret_rs value> pair of properties that appear in the [librdkafka](https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md) used by producer
// NOTE: bootstrap.servers MUST be set to the same value of the consumer's one
...
}
},
"collections": [
{
"topic": "<topic-name>",
"namespace": "<db-name>.<collection-name>",
"snapshot": "when_needed|initial" // tells when to perform snapshots when no messages are found on a topic or a resume token used by the change is not found.
}
]
}