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
Copy file name to clipboardExpand all lines: README.md
+51Lines changed: 51 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,57 @@ akka.persistence {
87
87
}
88
88
```
89
89
90
+
### Programmatic configuration
91
+
92
+
You can programmatically overrides the connection string setting in the HOCON configuration by adding a `MongoDbPersistenceSetup` to the
93
+
`ActorSystemSetup` during `ActorSystem` creation. The `MongoDbPersistenceSetup` takes `MongoClientSettings` instances to be used to configure
94
+
MongoDB client connection to the server. The `connection-string` settings in the HOCON configuration will be ignored if any of these `MongoClientSettings`
95
+
exists inside the Setup object.
96
+
97
+
> [!NOTE]
98
+
> The HOCON configuration is still needed for this to work, only the `connection-string` setting in the configuration will be overriden.
99
+
100
+
Setting connection override for both snapshot store and journal:
101
+
```
102
+
// Set snapshotClientSettings or journalClientSettings to null if you do not use them.
103
+
var snapshotClientSettings = new MongoClientSettings();
104
+
var journalClientSettings = new MongoClientSettings();
105
+
106
+
// database names are not needed when its client setting is set to null
var actorSystem = ActorSystem.Create("actorSystem", setup);
139
+
```
140
+
90
141
### Serialization
91
142
[Going from v1.4.0 onwards, all events and snapshots are saved as byte arrays using the standard Akka.Persistence format](https://github.com/akkadotnet/Akka.Persistence.MongoDB/issues/72).
* Bump [Akka.NET version to 1.4.17](https://github.com/akkadotnet/akka.net/releases/tag/1.4.17)
4
-
*[Resolve MongoDb write atomicity issues on write by not updating metadata collection](https://github.com/akkadotnet/Akka.Persistence.MongoDB/pull/186) - this is an important change that makes all writes atomic for an individual persistentId in MongoDb. We don't update the meta-data collection on write anymore - it's only done when the most recent items in the journal are deleted, and thus we store the highest recorded sequence number in the meta-data collection during deletes. All of the Akka.Persistence.Sql plugins operate this way as well.
3
+
*[Bump MongoDb.Driver to 2.12.2](https://github.com/akkadotnet/Akka.Persistence.MongoDB/pull/197)
4
+
*[Bump Akka.NET version to 1.4.19](https://github.com/akkadotnet/akka.net/releases/tag/1.4.19)
Please [read the Akka.Persistence.MongoDb README.md on how to use the new `MongoDbPersistenceSetup` feature to programmatically configure your `MongoDbClient`](https://github.com/akkadotnet/Akka.Persistence.MongoDB#programmatic-configuration).
ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result
111
192
193
+
CreateDir outputTests
112
194
projects |> Seq.iter (log)
113
195
projects |> Seq.iter (runSingleProject)
114
196
)
@@ -275,15 +357,17 @@ Target "Help" <| fun _ ->
275
357
"./build.ps1 [target]"
276
358
""
277
359
" Targets for building:"
278
-
" * Build Builds"
279
-
" * Nuget Create and optionally publish nugets packages"
280
-
" * SignPackages Signs all NuGet packages, provided that the following arguments are passed into the script: SignClientSecret={secret} and SignClientUser={username}"
281
-
" * RunTests Runs tests"
282
-
" * All Builds, run tests, creates and optionally publish nuget packages"
283
-
" * DocFx Creates a DocFx-based website for this solution"
360
+
" * Build Builds"
361
+
" * Nuget Create and optionally publish nugets packages"
362
+
" * SignPackages Signs all NuGet packages, provided that the following arguments are passed into the script: SignClientSecret={secret} and SignClientUser={username}"
363
+
" * RunTests Runs Net Framework tests"
364
+
" * RunTestsNetCore Runs Net Core tests"
365
+
" * RunTestsNet Runs Net 5 tests"
366
+
" * All Builds, run tests, creates and optionally publish nuget packages"
367
+
" * DocFx Creates a DocFx-based website for this solution"
0 commit comments