MongoDB
Overview
MongoDB publisher transport emits processed events into a defined database collection. Events are serialised using either the provided Document Formatter serializer or a custom transformer implementation.
Driver details
Example
Attributes schema
Configuration parameters available for the MongDB publisher transport.
Attribute | Description | Data Type | Required |
---|---|---|---|
database | Name of database | String | |
collection | Name of collection inserts will be applied to | String | |
ordered inserts | Hint to MongDB to insert documents using presented ordering | Boolean Default: true | |
servers | Map of servers with associated ports | Map<String,Integer> | |
enable ssl | Enable SSL | boolean Default: false | |
credentials | Credential configuration | See Credential Attributes section | |
serializer | Serialization configuration | See Serialization Attributes section |
Credential Attributes
Attribute | Description | Data Type | Required |
---|---|---|---|
username | Username | String | |
password | password | String | |
authenication database | Database to use to authenicate connected user | String Default: admin | |
mechanism | Authenication mechanism Options
| String Default: SCRAM_SHA_1 |
Serialization Attributes
This topic provides configuration parameters available object serialization process.
Attribute | Description | Data Type | Required |
---|---|---|---|
transform | User provided implementation | CustomTransformer | |
formatter | This is used when a custom transformer is not provided. Useful when chaining Joule processes | Formatter Default: documentFormatter (See Document Formatter) | |
contentType | Type of content to inform receiving application | String Default: application/octet-stream | |
encoding | Payload encoding method | String Default: base64 | |
batch | Flag to batch multiple messages in to a single payload | Boolean Default: false |
Serializer example
The configuration below will serialize StreamEvents as MongoDB documents.
Document Formatter
Joule ships with a MongoDB document formatter which converts a StreamEvents in to a MongoDB Document type.
Further details
Official MongoDB documentation
Official MongoDB docker image
Mongo Compass UI
Last updated