MongoDB
Publish JSON based events to the mature standard document storePublishes JSON-based events to MongoDB, a widely-used document store
Overview
Document database support is provided using the MongoDB Publisher Transport. Processed events are published to a specified MongoDB database collection.
The events are serialised using a document formatter serialiser or a custom transformer implementation.
This transport is designed to facilitate efficient data publishing into MongoDB with customisable serialisation options.
Some key features are:
MongoDB integration Sends processed events to a defined MongoDB collection.
Serialiser options Uses a default Document Formatter serialiser or allows custom serialisation.
Driver details: org.mongodb:mongodb-driver-sync:4.8.1
Examples & DSL attributes
This example sets up the MongoDB Publisher Transport to send events to a local MongoDB instance (localhost:27017
).
It stores data in the customerdb
database and emea_customers
collection, using ordered inserts.
Authentication is done with the joule
user and SCRAM-SHA-1 mechanism. Events are serialised individually (not in batches) with Base64
encoding and application/octet-stream
content type. SSL is disabled.
Attributes schema
Credential attributes schema
Serialisation attributes schema
This topic provides configuration parameters available object serialisation process.
Serialiser example
The configuration below will serialise StreamEvents
as MongoDB documents.
Document formatter
The document formatter in Joule is a built-in tool that converts StreamEvents
into MongoDB's Document type.
This allows the processed events to be formatted correctly before being inserted into a MongoDB collection. The formatter ensures that the data is serialised in a way that MongoDB can understand and store efficiently.
Additional resources
Official MongoDB documentation
Official MongoDB docker image
Mongo Compass UI
Last updated