diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index a227772..e590b96 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,6 +1,2 @@
-#### 1.3.14 October 04 2019 ####
-You can see [the full set of changes for Akka.Persistence.MongoDb v1.3.14 here](https://github.com/akkadotnet/Akka.Persistence.MongoDB/milestone/2).
-
-This PR fixes a number of problems stemming from implementations of Akka.Persistence.Query implementations that were incorrect.
-
-**Note: we're working on [adding support for future versions of Akka.Persistence.MongoDB and you should read them here if you plan on continuing to use the plugin](https://github.com/akkadotnet/Akka.Persistence.MongoDB/issues/72).**
\ No newline at end of file
+#### 1.4.0-beta1 October 30 2019 ####
+Beta release of Akka.Persistence.MongoDB which implements the [new standardized Akka.Persistence serialization paradigm](https://github.com/akkadotnet/Akka.Persistence.MongoDB/issues/72) going forward. Has full backwards compatibility for reading events which were written in 1.3.[0-14] style serialization.
\ No newline at end of file
diff --git a/build-system/windows-release.yaml b/build-system/windows-release.yaml
index a54ca91..6927c56 100644
--- a/build-system/windows-release.yaml
+++ b/build-system/windows-release.yaml
@@ -26,7 +26,7 @@ steps:
displayName: 'FAKE Build'
inputs:
filename: build.cmd
- arguments: 'nuget nugetpublishurl=https://www.nuget.org/api/v2/package nugetkey=$(nugetKey)'
+ arguments: 'nuget nugetpublishurl=https://www.nuget.org/api/v2/package nugetkey=$(nugetKey) nugetprerelease=dev'
- task: GitHubRelease@0
displayName: 'GitHub release (create)'
diff --git a/build.fsx b/build.fsx
index 720d15a..ae2608b 100644
--- a/build.fsx
+++ b/build.fsx
@@ -26,8 +26,9 @@ let preReleaseVersionSuffix = "beta" + (if (not (buildNumber = "0")) then (build
let versionSuffix =
match (getBuildParam "nugetprerelease") with
| "dev" -> preReleaseVersionSuffix
- | _ -> ""
-
+ | "" -> ""
+ | str -> str
+
let releaseNotes =
File.ReadLines "./RELEASE_NOTES.md"
|> ReleaseNotesHelper.parseReleaseNotes
diff --git a/src/Akka.Persistence.MongoDb.Tests/Akka.Persistence.MongoDb.Tests.csproj b/src/Akka.Persistence.MongoDb.Tests/Akka.Persistence.MongoDb.Tests.csproj
index 9ae4ee6..9d35353 100644
--- a/src/Akka.Persistence.MongoDb.Tests/Akka.Persistence.MongoDb.Tests.csproj
+++ b/src/Akka.Persistence.MongoDb.Tests/Akka.Persistence.MongoDb.Tests.csproj
@@ -2,8 +2,7 @@
- netcoreapp2.0
-
+ netcoreapp2.1
diff --git a/src/Akka.Persistence.MongoDb.Tests/Bug61FixSpec.cs b/src/Akka.Persistence.MongoDb.Tests/Bug61FixSpec.cs
index 25e39db..a20624d 100644
--- a/src/Akka.Persistence.MongoDb.Tests/Bug61FixSpec.cs
+++ b/src/Akka.Persistence.MongoDb.Tests/Bug61FixSpec.cs
@@ -206,4 +206,4 @@ class = ""Akka.Persistence.MongoDb.Query.MongoDbReadJournalProvider, Akka.Persis
return ConfigurationFactory.ParseString(specString);
}
}
-}
+}
\ No newline at end of file
diff --git a/src/Akka.Persistence.MongoDb.Tests/MongoDbJournalSpec.cs b/src/Akka.Persistence.MongoDb.Tests/MongoDbJournalSpec.cs
index 876657b..38f059a 100644
--- a/src/Akka.Persistence.MongoDb.Tests/MongoDbJournalSpec.cs
+++ b/src/Akka.Persistence.MongoDb.Tests/MongoDbJournalSpec.cs
@@ -41,36 +41,4 @@ class = ""Akka.Persistence.MongoDb.Journal.MongoDbJournal, Akka.Persistence.Mong
return ConfigurationFactory.ParseString(specString);
}
}
-
- [Collection("MongoDbSpec")]
- public class MongoDbBinaryJournalSpec : JournalSpec, IClassFixture
- {
- protected override bool SupportsRejectingNonSerializableObjects { get; } = false;
-
- public MongoDbBinaryJournalSpec(DatabaseFixture databaseFixture) : base(CreateSpecConfig(databaseFixture), "MongoDbJournalSpec")
- {
- Initialize();
- }
-
- private static Config CreateSpecConfig(DatabaseFixture databaseFixture)
- {
- var specString = @"
- akka.test.single-expect-default = 3s
- akka.persistence {
- publish-plugin-commands = on
- journal {
- plugin = ""akka.persistence.journal.mongodb""
- mongodb {
- class = ""Akka.Persistence.MongoDb.Journal.MongoDbJournal, Akka.Persistence.MongoDb""
- connection-string = """ + databaseFixture.ConnectionString + @"""
- auto-initialize = on
- collection = ""EventJournal""
- stored-as = binary
- }
- }
- }";
-
- return ConfigurationFactory.ParseString(specString);
- }
- }
}
diff --git a/src/Akka.Persistence.MongoDb.Tests/MongoDbSettingsSpec.cs b/src/Akka.Persistence.MongoDb.Tests/MongoDbSettingsSpec.cs
index 51409ab..ce5f864 100644
--- a/src/Akka.Persistence.MongoDb.Tests/MongoDbSettingsSpec.cs
+++ b/src/Akka.Persistence.MongoDb.Tests/MongoDbSettingsSpec.cs
@@ -22,7 +22,6 @@ public void Mongo_JournalSettings_must_have_default_values()
mongoPersistence.JournalSettings.AutoInitialize.Should().BeFalse();
mongoPersistence.JournalSettings.Collection.Should().Be("EventJournal");
mongoPersistence.JournalSettings.MetadataCollection.Should().Be("Metadata");
- mongoPersistence.JournalSettings.StoredAs.Should().BeOfType();
}
[Fact]
@@ -33,7 +32,6 @@ public void Mongo_SnapshotStoreSettingsSettings_must_have_default_values()
mongoPersistence.SnapshotStoreSettings.ConnectionString.Should().Be(string.Empty);
mongoPersistence.SnapshotStoreSettings.AutoInitialize.Should().BeFalse();
mongoPersistence.SnapshotStoreSettings.Collection.Should().Be("SnapshotStore");
- mongoPersistence.SnapshotStoreSettings.StoredAs.Should().BeOfType();
}
}
}
diff --git a/src/Akka.Persistence.MongoDb.Tests/Serialization/MongoDbJournalSerializationSpec.cs b/src/Akka.Persistence.MongoDb.Tests/Serialization/MongoDbJournalSerializationSpec.cs
new file mode 100644
index 0000000..2f7455a
--- /dev/null
+++ b/src/Akka.Persistence.MongoDb.Tests/Serialization/MongoDbJournalSerializationSpec.cs
@@ -0,0 +1,51 @@
+using System.Collections.Generic;
+using Akka.Configuration;
+using Akka.Persistence.TCK.Serialization;
+using Akka.Util.Internal;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace Akka.Persistence.MongoDb.Tests.Serialization
+{
+ [Collection("MongoDbSpec")]
+ public class MongoDbJournalSerializationSpec : JournalSerializationSpec, IClassFixture
+ {
+ public static readonly AtomicCounter Counter = new AtomicCounter(0);
+ private readonly ITestOutputHelper _output;
+
+ public MongoDbJournalSerializationSpec(ITestOutputHelper output, DatabaseFixture databaseFixture)
+ : base(CreateSpecConfig(databaseFixture, Counter.GetAndIncrement()), nameof(MongoDbJournalSerializationSpec), output)
+ {
+ _output = output;
+ output.WriteLine(databaseFixture.ConnectionString + Counter.Current);
+ }
+
+ private static Config CreateSpecConfig(DatabaseFixture databaseFixture, int id)
+ {
+ var specString = @"
+ akka.test.single-expect-default = 3s
+ akka.persistence {
+ publish-plugin-commands = on
+ journal {
+ plugin = ""akka.persistence.journal.mongodb""
+ mongodb {
+ class = ""Akka.Persistence.MongoDb.Journal.MongoDbJournal, Akka.Persistence.MongoDb""
+ connection-string = """ + databaseFixture.ConnectionString + @"""
+ auto-initialize = on
+ collection = ""EventJournal""
+ stored-as = object
+ }
+ }
+ }";
+
+ return ConfigurationFactory.ParseString(specString);
+ }
+
+
+ [Fact(Skip = "Waiting on better error messages")]
+ public override void Journal_should_serialize_Persistent_with_EventAdapter_manifest()
+ {
+ base.Journal_should_serialize_Persistent_with_EventAdapter_manifest();
+ }
+ }
+}
diff --git a/src/Akka.Persistence.MongoDb.Tests/Serialization/MongoDbSnapshotStoreSerializationSpec.cs b/src/Akka.Persistence.MongoDb.Tests/Serialization/MongoDbSnapshotStoreSerializationSpec.cs
new file mode 100644
index 0000000..72b77eb
--- /dev/null
+++ b/src/Akka.Persistence.MongoDb.Tests/Serialization/MongoDbSnapshotStoreSerializationSpec.cs
@@ -0,0 +1,42 @@
+using Akka.Configuration;
+using Akka.Persistence.TCK.Serialization;
+using Akka.Util.Internal;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace Akka.Persistence.MongoDb.Tests.Serialization
+{
+ [Collection("MongoDbSpec")]
+ public class MongoDbSnapshotStoreSerializationSpec : SnapshotStoreSerializationSpec, IClassFixture
+ {
+ public static readonly AtomicCounter Counter = new AtomicCounter(0);
+ private readonly ITestOutputHelper _output;
+
+ public MongoDbSnapshotStoreSerializationSpec(ITestOutputHelper output, DatabaseFixture databaseFixture)
+ : base(CreateSpecConfig(databaseFixture, Counter.GetAndIncrement()), nameof(MongoDbSnapshotStoreSerializationSpec), output)
+ {
+ _output = output;
+ output.WriteLine(databaseFixture.ConnectionString + Counter.Current);
+ }
+
+ private static Config CreateSpecConfig(DatabaseFixture databaseFixture, int id)
+ {
+ var specString = @"
+ akka.test.single-expect-default = 3s
+ akka.persistence {
+ publish-plugin-commands = on
+ snapshot-store {
+ plugin = ""akka.persistence.snapshot-store.mongodb""
+ mongodb {
+ class = ""Akka.Persistence.MongoDb.Snapshot.MongoDbSnapshotStore, Akka.Persistence.MongoDb""
+ connection-string = """ + databaseFixture.ConnectionString + id + @"""
+ auto-initialize = on
+ collection = ""SnapshotStore""
+ }
+ }
+ }";
+
+ return ConfigurationFactory.ParseString(specString);
+ }
+ }
+}
diff --git a/src/Akka.Persistence.MongoDb/Akka.Persistence.MongoDb.csproj b/src/Akka.Persistence.MongoDb/Akka.Persistence.MongoDb.csproj
index 85184ab..5d2e157 100644
--- a/src/Akka.Persistence.MongoDb/Akka.Persistence.MongoDb.csproj
+++ b/src/Akka.Persistence.MongoDb/Akka.Persistence.MongoDb.csproj
@@ -2,7 +2,7 @@
- net45;netstandard1.6
+ netstandard2.0
@@ -10,6 +10,6 @@
-
+
\ No newline at end of file
diff --git a/src/Akka.Persistence.MongoDb/Journal/MongoDbJournal.cs b/src/Akka.Persistence.MongoDb/Journal/MongoDbJournal.cs
index 5f521ae..c7972ed 100644
--- a/src/Akka.Persistence.MongoDb/Journal/MongoDbJournal.cs
+++ b/src/Akka.Persistence.MongoDb/Journal/MongoDbJournal.cs
@@ -37,51 +37,19 @@ public class MongoDbJournal : AsyncWriteJournal
private readonly HashSet _allPersistenceIds = new HashSet();
private readonly HashSet _allPersistenceIdSubscribers = new HashSet();
- private readonly Dictionary> _tagSubscribers =
+ private readonly Dictionary> _tagSubscribers =
new Dictionary>();
- private readonly Dictionary> _persistenceIdSubscribers
+ private readonly Dictionary> _persistenceIdSubscribers
= new Dictionary>();
- private readonly Func