Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.optionsWriteConcernacknowledgment

acknowledgment

Describes how many nodes must acknowledge the write operation.

For the different options, see:

If this field is null (default), the MongoDB default acknowledgment applies, which is WriteAcknowledgment.Majority in most deployments.

Example

collections.updateMany(
    options = {
        writeConcern(WriteConcern(WriteAcknowledgment.Nodes(2))
    }
) {
   User::age inc 1
}

External resources

See also