---
name: "mongoc_collection_set_write_concern"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_collection_set_write_concern"
---

# mongoc\_collection\_set\_write\_concern(3)

## SYNOPSIS

```
void
mongoc_collection_set_write_concern (
   mongoc_collection_t *collection,
   const mongoc_write_concern_t *write_concern);
```

## PARAMETERS

- •

  **collection**: A *mongoc\_collection\_t*.

- •

  **write\_concern**: A *mongoc\_write\_concern\_t*.

## DESCRIPTION

Sets the write concern to use for operations on **collection**.

The default write concern is MONGOC\_WRITE\_CONCERN\_W\_DEFAULT: the driver blocks awaiting basic acknowledgement of write operations from MongoDB. This is the correct write concern for the great majority of applications.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
