MongoDB

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

org.mongodb:mongodb-driver-sync:4.8.1

Example configuration

mongodbPublisher:
  servers:
    localhost: 27017
  enable ssl: false

  database: customerdb
  collection: emea_customers
  ordered inserts: true

  credentials:
    user: joule
    password: password
    mechanism: SCRAM_SHA_1

  serializer:
    batch: false
    formatter:
      documentFormatter:
        contentType: application/octet-stream
        encoding: base64

Core Attributes

Configuration parameters available for the MongDB publisher transport.

Credential Attributes

Serialization Attributes

This topic provides configuration parameters available object serialization process.

Serializer example

The configuration below will serialize StreamEvents as MongoDB documents.

serializer:
  batch: false
  formatter:
    documentFormatter:
      contentType: application/octet-stream
      encoding: base64

Document Formatter

Joule ships with a MongoDB document formatter which converts a StreamEvents in to a MongoDB Document type.

Further details

Last updated