mongodb-bridge-schema
Schema for the MongoDB® Bridge, which describes all configuration options for the bridge.
{
"type": "object",
"description": "Config object representing the MongoDB-Bridge configuration.",
"properties": {
"version": {
"description": "Version of the configuration schema",
"type": "string"
},
"connections": {
"type": "array",
"description": "Array of sub-configurations per MongoDB connection/database.",
"items": {
"properties": {
"name": {
"type": "string",
"description": "Textual identifier of this configuration."
},
"connection": {
"type": "object",
"description": "MongoDB server specific configurations.1",
"properties": {
"connectionURI": {
"type": "string",
"description": "MongoDB connection string that contains protocol, hostname, port, database name, optional credentials and options."
},
"connectionParameters": {
"type": "object",
"description": "Object that holds connection parameters to connect to the MongoDB server.",
"properties": {
"hostname": {
"type": "string",
"description": "Hostname or IP address of the MongoDB server."
},
"port": {
"type": "integer",
"description": "Port the MongoDB server is listening on."
},
"database": {
"type": "string",
"description": "Name of the database, the data should be inserted to."
},
"credentials": {
"type": "object",
"description": "Basic authentication configuration.",
"properties": {
"username": {
"type": "string"
},
"password": {
"type": "string"
}
}
}
},
"required": [
"hostname",
"port",
"database"
]
}
},
"oneOf": [
{
"required": [
"connectionURI"
]
},
{
"required": [
"connectionParameters"
]
}
]
},
"options": {
"type": "object",
"description": "Options to configure queueing and publish retry mechanism.",
"properties": {
"maxQueuedMessages": {
"type": "integer",
"minimum": 1,
"description": "Specifies the limit of not-yet-processed/inserted MQTT messages, before the plugin starts to drop them."
},
"retryInsertMinDelay": {
"type": "integer",
"default": 0,
"minimum": 1,
"description": "Initial delay in milliseconds before the plugin tries to insert a message again, once the server returned an error or was not available. The increment follows a pattern of double growth, where each increase is doubled compared to the previous increment. If not specified, the plugin won't try to resend messages again after the first try."
},
"retryInsertMaxDelay": {
"type": "integer",
"default": 0,
"minimum": 1,
"description": "Maximum delay in milliseconds before the plugin tries to insert a message again, once the server returned an error or was not available. If not specified, the plugin won't try to resend messages again after the first try."
}
},
"required": [
"maxQueuedMessages"
]
},
"topicMappings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Textual identifier of this topic mapping."
},
"target": {
"type": "string",
"description": "Name of the collection, the MQTT data should inserted to."
},
"schemaMapping": {
"type": "string",
"description": "Name of a schema mapping, which should be applied to this topic mapping. If not specified the default schema mapping including all fields will be used."
},
"mqttTopics": {
"type": "array",
"description": "List of topic filters the plugin forwards messages from, separated by a comma.",
"items": {
"type": "string"
}
}
},
"required": [
"name",
"target",
"mqttTopics"
]
}
}
},
"required": [
"name",
"connection",
"options",
"topicMappings"
]
}
},
"schemaMappings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Textual identifier of this schema mapping."
},
"mapping": {
"description": "Array of mapped MQTT message properties.",
"type": "array",
"items": {
"type": "object",
"description": "Mapping object where \"target\" is the column name and \"source\" is the MQTT message information field.",
"properties": {
"source": {
"description": "MQTT message property",
"type": "string",
"enum": [
"hostname",
"payload",
"jsonPayload",
"topic",
"qos",
"client_id",
"retain",
"timestamp"
]
},
"target": {
"description": "Target name (e.g. DB column, destination JSON document property, etc)",
"type": "string"
}
},
"required": [
"source",
"target"
]
}
}
}
}
}
},
"required": [
"connections",
"schemaMappings"
]
}