---
name: "mongoc_client_get_max_message_size"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.23.1-1+deb12u3"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_client_get_max_message_size"
---

# mongoc\_client\_get\_max\_message\_size(3)

mongoc\_client\_get\_max\_message\_size()

## NAME

mongoc\_client\_get\_max\_message\_size - mongoc\_client\_get\_max\_message\_size()

## SYNOPSIS

```
int32_t
mongoc_client_get_max_message_size (mongoc_client_t *client);
```

The *mongoc\_client\_get\_max\_message\_size()* returns the maximum message size allowed by the cluster. Until a connection has been made, this will be the default of 40Mb.

## DEPRECATED

**WARNING:**

This function is deprecated and should not be used in new code.

## PARAMETERS

- •

  **client**: A *mongoc\_client\_t*.

## RETURNS

The server provided max message size, or 40Mb if no connection has been established.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2017-present, MongoDB, Inc
