MongoDB.MaxMessageSize
----------------------

Returns the maximum message size allowed by the cluster.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [MongoDB](component_MongoDB.md) | [12.3](newinversion123.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

### Deprecated

This function was [deprecated](deprecated.md).

MBS( "MongoDB.MaxMessageSize"; MongoDBRef ) 

**MBS**( **"MongoDB.MaxMessageSize";** /\* Returns the maximum message size allowed by the cluster. \*/  
**$MongoDBRef**) /\* The reference number for the mongo connection.e.g. $MongoDB \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| MongoDBRef | The reference number for the mongo connection. | $MongoDB |

### Result

Returns number or error.

### Description

Returns the maximum message size allowed by the cluster.  
Until a connection has been made, this will be the default of 40Mb.  
### Examples

Shows maximum message size:

 Show Custom Dialog \[ "Maximum message size:" ; MBS ( "MongoDB.MaxMessageSize"; $mongo ) \]  
### Release notes

- **Version 16.0**
    - Deprecated [MongoDB.MaxMessageSize](https://www.mbsplugins.eu/MongoDBMaxMessageSize.shtml) and [MongoDB.MaxBSONSize](https://www.mbsplugins.eu/MongoDBMaxBSONSize.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 15.6pr1](https://www.mbsplugins.de/archive/2025-12-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.3pr5](https://www.mbsplugins.de/archive/2022-06-27/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 19th June 2022 , last changed 30th November 2025

  
[MongoDB.MaxBSONSize](MongoDBMaxBSONSize.md) - [MongoDB.New](MongoDBNew.md)

[HTML Version](MongoDBMaxMessageSize.shtml)