//tag::ref-doc[]
= MongoDB Sink

This sink application ingest incoming data into MongoDB.
This application is fully based on the `MongoDataAutoConfiguration`, so refer to the https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features.html#boot-features-mongodb[Spring Boot MongoDB Support] for more information.

== Input

=== Payload

* Any POJO
* `String`
* `byte[]`

== Options

The **$$mongodb$$** $$sink$$ has the following options:


//tag::configuration-properties[]
Properties grouped by prefix:


=== mongodb.consumer

$$collection$$:: $$The MongoDB collection to store data.$$ *($$String$$, default: `$$<none>$$`)*
$$collection-expression$$:: $$The SpEL expression to evaluate MongoDB collection.$$ *($$Expression$$, default: `$$<none>$$`)*

=== spring.data.mongodb

$$authentication-database$$:: $$Authentication database name.$$ *($$String$$, default: `$$<none>$$`)*
$$auto-index-creation$$:: $$Whether to enable auto-index creation.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$database$$:: $$Database name.$$ *($$String$$, default: `$$<none>$$`)*
$$field-naming-strategy$$:: $$Fully qualified name of the FieldNamingStrategy to use.$$ *($$Class<?>$$, default: `$$<none>$$`)*
$$grid-fs-database$$:: $$GridFS database name.$$ *($$String$$, default: `$$<none>$$`)*
$$host$$:: $$Mongo server host. Cannot be set with URI.$$ *($$String$$, default: `$$<none>$$`)*
$$password$$:: $$Login password of the mongo server. Cannot be set with URI.$$ *($$Character[]$$, default: `$$<none>$$`)*
$$port$$:: $$Mongo server port. Cannot be set with URI.$$ *($$Integer$$, default: `$$<none>$$`)*
$$replica-set-name$$:: $$Required replica set name for the cluster. Cannot be set with URI.$$ *($$String$$, default: `$$<none>$$`)*
$$uri$$:: $$Mongo database URI. Cannot be set with host, port, credentials and replica set name.$$ *($$String$$, default: `$$mongodb://localhost/test$$`)*
$$username$$:: $$Login user of the mongo server. Cannot be set with URI.$$ *($$String$$, default: `$$<none>$$`)*
$$uuid-representation$$:: $$Representation to use when converting a UUID to a BSON binary value.$$ *($$UuidRepresentation$$, default: `$$java-legacy$$`, possible values: `UNSPECIFIED`,`STANDARD`,`C_SHARP_LEGACY`,`JAVA_LEGACY`,`PYTHON_LEGACY`)*
//end::configuration-properties[]

//end::ref-doc[]
