registerMongoPlugins
此内容尚不支持你的语言。
registerMongoPlugins(
ext,options?):MongoPluginHandles
Defined in: src/persistence/journals/MongoPlugin.ts:43
One-shot registration of the MongoDB journal + snapshot store against the
running PersistenceExtension, returning a ready-to-use DurableState store
handle. Mirrors registerPostgresPlugins / registerLibSqlPlugins.
After this call, activate the journal + snapshot store via:
actor-ts.persistence.journal.plugin = "actor-ts.persistence.journal.mongodb"
actor-ts.persistence.snapshot-store.plugin = "actor-ts.persistence.snapshot-store.mongodb"
either via HOCON or a { config: { … } } override.
Pass client to share one MongoClient across all three stores — it is
itself a connection pool, so sharing is the normal case. With a shared client
no store owns it, so none closes it: close it yourself when the system shuts
down. Passing url instead lets each store build its own client and close it
on close().
Parameters
Section titled “Parameters”options?
Section titled “options?”RegisterMongoPluginsOptions = {}
