mongodb
This component is experimental and therefore subject to change or removal outside of major version releases.
Performs operations against MongoDB for each message, allowing you to store or retrieve data within message payloads.
Introduced in version 1.0.0.
- Common
- Advanced
# Common config fields, showing default values
label: ""
mongodb:
url: mongodb://localhost:27017 # No default (required)
database: "" # No default (required)
username: ""
password: ""
collection: "" # No default (required)
operation: insert-one
write_concern:
w: ""
j: false
w_timeout: ""
document_map: ""
filter_map: ""
hint_map: ""
upsert: false
# All config fields, showing default values
label: ""
mongodb:
url: mongodb://localhost:27017 # No default (required)
database: "" # No default (required)
username: ""
password: ""
collection: "" # No default (required)
operation: insert-one
write_concern:
w: ""
j: false
w_timeout: ""
document_map: ""
filter_map: ""
hint_map: ""
upsert: false
json_marshal_mode: canonical
Fields
url
The URL of the target MongoDB server.
Type: string
# Examples
url: mongodb://localhost:27017
database
The name of the target MongoDB database.
Type: string
username
The username to connect to the database.
Type: string
Default: ""
password
The password to connect to the database.
This field contains sensitive information that usually shouldn't be added to a config directly, read our secrets page for more info.
Type: string
Default: ""
collection
The name of the target collection. This field supports interpolation functions.
Type: string
operation
The mongodb operation to perform.
Type: string
Default: "insert-one"
Options: insert-one
, delete-one
, delete-many
, replace-one
, update-one
, find-one
.
write_concern
The write concern settings for the mongo connection.
Type: object
write_concern.w
W requests acknowledgement that write operations propagate to the specified number of mongodb instances.
Type: string
Default: ""
write_concern.j
J requests acknowledgement from MongoDB that write operations are written to the journal.
Type: bool
Default: false