File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,16 @@ application has multiple `MongoClient` instances connected to the same MongoDB s
33
33
- ` waitQueueSize ` : the current size of the wait queue for a connection from this pool
34
34
- ` checkedOutCount ` : the current count of connections that are currently in use
35
35
36
+ JMX connection pool monitoring is disabled by default. To enable it add a ` com.mongodb.management.JMXConnectionPoolListener ` instance via
37
+ ` MongoClientSettings ` :
38
+
39
+ ``` java
40
+ MongoClientSettings settings =
41
+ MongoClientSettings . builder()
42
+ .applyToConnectionPoolSettings(builder - > builder. addConnectionPoolListener(new JMXConnectionPoolListener ()))
43
+ .build();
44
+ ```
45
+
36
46
# Command Monitoring
37
47
38
48
The driver implements the
Original file line number Diff line number Diff line change @@ -33,6 +33,19 @@ application has multiple `MongoClient` instances connected to the same MongoDB s
33
33
- ` waitQueueSize ` : the current size of the wait queue for a connection from this pool
34
34
- ` checkedOutCount ` : the current count of connections that are currently in use
35
35
36
+
37
+ JMX connection pool monitoring is disabled by default. To enable it add a ` com.mongodb.management.JMXConnectionPoolListener ` instance via
38
+ ` MongoClientOptions ` :
39
+
40
+ ``` java
41
+ MongoClientOptions options =
42
+ MongoClientOptions . builder()
43
+ .addConnectionPoolListener(new JMXConnectionPoolListener ())
44
+ .build();
45
+
46
+
47
+ ```
48
+
36
49
# Command Monitoring
37
50
38
51
The driver implements the
You can’t perform that action at this time.
0 commit comments