Since SP1 AEM now allows reading from MongoDB secondaries. I have a question around the configuration of this. Do I need to explicitely state in the Mongo Config to allow reading from secondaries or is this in the AEM configuration ?
Thanks in advance.
Solved! Go to Solution.
Views
Replies
Total Likes
For those interested. By default your driver will set Read Preference to Primary only. To change that you need to specify this on the connection string. I am currently experimenting with adding this to my start script "-Doak.mongo.uri.readPreference:secondaryPreferred"
Views
Replies
Total Likes
For those interested. By default your driver will set Read Preference to Primary only. To change that you need to specify this on the connection string. I am currently experimenting with adding this to my start script "-Doak.mongo.uri.readPreference:secondaryPreferred"
Views
Replies
Total Likes
Hi Katrien,
Is this setting -Doak.mongo.uri.readPreference:secondaryPreferred is working for you ?.
Is there any alternative way to give this setting with MongoDB connection string. We are using this below connection string in our MongoDB cluster :
mongouri="mongodb://stg_aemauthor:nPfqYMkj9mHKvghZYiZe@mongodbus2.illumina.com:27017,mongodbus:27017,mongodbapac:27017,mongodbemea:27017/$external?authMechanism\=PLAIN&replicaSet\=envrepl"
I want to read from particular mongodb. Is it configurable?
Thanks,
Shariq
Views
Replies
Total Likes
Views
Likes
Replies