diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 046eb41..8760de9 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,2 +1,29 @@ -#### 1.4.0-beta2 October 31 2019 #### -Fixed [an issue with Snapshot serialization in v1.4.0-beta1](https://github.com/akkadotnet/Akka.Persistence.MongoDB/pull/98) \ No newline at end of file +#### 1.4.0-beta3 February 04 2020 #### + +Introduced legacy serialization modes. + +[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). + +However, in the event that you have one of the following use cases: + +1. Legacy data all stored in the original BSON / "object" format; +2. A use case where BSON is preferable, i.e. so it can be queried directly via MongoDb queries rather than Akka.Persistence.Query; or +3. A requirement to keep all data in human-readable form. + +Then you can disable binary serialization (enabled by default) via the following HOCON: + +``` +akka.persistence.mongodb{ + journal{ + legacy-serialization = off + } + + snapshot-store{ + legacy-serialization = off + } +} +``` + +Setting `legacy-serialization = on` will allow you to save objects in a BSON format. + +**WARNING**: However, `legacy-serialization = on` will break Akka.NET serialization. `IActorRef`s, Akka.Cluster.Sharding, `AtLeastOnceDelivery` actors, and other built-in Akka.NET use cases can't be properly supported using this format. Use it at your own risk. \ No newline at end of file diff --git a/build.fsx b/build.fsx index ae2608b..0e19f78 100644 --- a/build.fsx +++ b/build.fsx @@ -23,15 +23,20 @@ let solutionFile = FindFirstMatchingFile "*.sln" __SOURCE_DIRECTORY__ // dynami let buildNumber = environVarOrDefault "BUILD_NUMBER" "0" let hasTeamCity = (not (buildNumber = "0")) // check if we have the TeamCity environment variable for build # set let preReleaseVersionSuffix = "beta" + (if (not (buildNumber = "0")) then (buildNumber) else DateTime.UtcNow.Ticks.ToString()) +let releaseNotes = + File.ReadLines (__SOURCE_DIRECTORY__ @@ "RELEASE_NOTES.md") + |> ReleaseNotesHelper.parseReleaseNotes + +let versionFromReleaseNotes = + match releaseNotes.SemVer.PreRelease with + | Some r -> r.Origin + | None -> "" + let versionSuffix = match (getBuildParam "nugetprerelease") with | "dev" -> preReleaseVersionSuffix - | "" -> "" + | "" -> versionFromReleaseNotes | str -> str - -let releaseNotes = - File.ReadLines "./RELEASE_NOTES.md" - |> ReleaseNotesHelper.parseReleaseNotes // Directories let toolsDir = __SOURCE_DIRECTORY__ @@ "tools" @@ -139,7 +144,7 @@ Target "SignPackages" (fun _ -> if(canSign) then log "Signing information is available." - let assemblies = !! (outputNuGet @@ "*.nupkg") + let assemblies = !! (outputNuGet @@ "*.*upkg") let signPath = let globalTool = tryFindFileOnPath "SignClient.exe" diff --git a/src/common.props b/src/common.props index b71854b..a4f5244 100644 --- a/src/common.props +++ b/src/common.props @@ -1,12 +1,30 @@ - Copyright © 2013-2019 Akka.NET Project + Copyright © 2013-2020 Akka.NET Project Akka.NET Contrib 1.4.0 http://getakka.net/images/akkalogo.png https://github.com/akkadotnet/Akka.Persistence.MongoDB https://github.com/akkadotnet/Akka.Persistence.MongoDB/blob/master/LICENSE.md - Fixed [an issue with Snapshot serialization in v1.4.0-beta1](https://github.com/akkadotnet/Akka.Persistence.MongoDB/pull/98) + Introduced legacy serialization modes. +[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). +However, in the event that you have one of the following use cases: +1. Legacy data all stored in the original BSON / "object" format; +2. A use case where BSON is preferable, i.e. so it can be queried directly via MongoDb queries rather than Akka.Persistence.Query; or +3. A requirement to keep all data in human-readable form. +Then you can disable binary serialization (enabled by default) via the following HOCON: +``` +akka.persistence.mongodb{ +journal{ +legacy-serialization = off +} +snapshot-store{ +legacy-serialization = off +} +} +``` +Setting `legacy-serialization = on` will allow you to save objects in a BSON format. +WARNING**: However, `legacy-serialization = on` will break Akka.NET serialization. `IActorRef`s, Akka.Cluster.Sharding, `AtLeastOnceDelivery` actors, and other built-in Akka.NET use cases can't be properly supported using this format. Use it at your own risk. true Akka Persistence journal and snapshot store backed by MongoDB database. $(NoWarn);CS1591 @@ -16,4 +34,16 @@ 16.4.0 1.4.0-beta4 + + + + + + true + + true + + true + snupkg + \ No newline at end of file