You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each Persistence plugin instantiation creates its own MongoClient instance, which comes with its own connection pool, server heartbeats and other not so cheap resources.
While this might be a rare use case, our app keeps every client's data in a separate database so we are using akka's akka.persistence.RuntimePluginConfig to supply persistence plugin config with overwritten database name at runtime. The plugin ids are also created at runtime based on the client identifier. This all works nicely except for pretty much uncontrolled usage of mongo connections.
To better control the usage of mongo servers it'd be nice to have separate control over the mongodb driver instantiation(-s).
I'd suggest wrapping MongoClient in a separate actor system extension with some default id and allow overwriting the extension id in each plugin instance to support the client per plugin instance scenario (the current state).
If this becomes a pressing problem for us very soon I'd be happy to contribute, otherwise will be waiting for new versions of the plugin, but I'm sure there are other more important things for you and other contributors to prioritize first.
The text was updated successfully, but these errors were encountered:
Each Persistence plugin instantiation creates its own
MongoClient
instance, which comes with its own connection pool, server heartbeats and other not so cheap resources.While this might be a rare use case, our app keeps every client's data in a separate database so we are using akka's
akka.persistence.RuntimePluginConfig
to supply persistence plugin config with overwritten database name at runtime. The plugin ids are also created at runtime based on the client identifier. This all works nicely except for pretty much uncontrolled usage of mongo connections.To better control the usage of mongo servers it'd be nice to have separate control over the mongodb driver instantiation(-s).
I'd suggest wrapping
MongoClient
in a separate actor system extension with some default id and allow overwriting the extension id in each plugin instance to support the client per plugin instance scenario (the current state).If this becomes a pressing problem for us very soon I'd be happy to contribute, otherwise will be waiting for new versions of the plugin, but I'm sure there are other more important things for you and other contributors to prioritize first.
The text was updated successfully, but these errors were encountered: