I have a server that requires data integrity that is enforced through the use of multi-document transactions (which requires Primary ReadPreference), but also serves many Changestreams across multiple different collections (SecondaryPreferred would be the preferred ReadConcern here).
What would be the best practice to support this? It seems you can’t set a read preference on ChangeStreams, which would have been the easiest way. It seems the only way to set a ReadPreference is client-wide with the official MongoDB golang driver.
Would maintaining two clients, one with ReadPref Primary and one with ReadPref SecondaryPreferred, be the best way to handle this? Or does Mongo have a more elegant way of handling this?
Thanks for any suggestions