[JAVA-4619] ClusterId should be initialized with the applicationName from MongoClientSettings/Options Created: 17/May/22  Updated: 28/Oct/23  Resolved: 18/May/22

Status: Closed
Project: Java Driver
Component/s: Monitoring
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Bug Priority: Minor - P4
Reporter: Ramasai Tadepalli Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Minor Change
Documentation Changes: Not Needed

 Description   

Summary

The DefaultClusterFactory should create the ClusterId with the constructor that takes a description, and pass the applicationName as the argument. Currently it uses the no-args constructor. This will ensure that any registered ClusterListener}}s have access to the {{applicationName.

Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).

This has been happening since driver version 4.0.



 Comments   
Comment by Githook User [ 18/May/22 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Use applicationName in ClusterId (#939)

JAVA-4619
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/fdabb35512fa382c34459580f26cd75cc5244673

Generated at Thu Feb 08 09:02:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.