Skip to content
This repository was archived by the owner on Mar 20, 2025. It is now read-only.

Commit 0ebab83

Browse files
committed
Merge pull request #17 from Horusiath/dev
Trigger 1.0.5 release
2 parents 88af981 + 263ee19 commit 0ebab83

21 files changed

+257
-337
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,6 @@ FakesAssemblies/
211211
/src/.Akka.boltdata/TestResults.json
212212
resetdev.bat
213213
/src/packages/repositories.config
214+
215+
# FAKE build folder
216+
.fake/

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ akka.persistence.journal.postgresql.connection-string = "<database connection st
1616
Similar configuration may be used to setup a PostgreSql snapshot store:
1717

1818
```
19-
akka.persistence.snasphot-store.plugin = "akka.persistence.snasphot-store.postgresql"
20-
akka.persistence.snasphot-store.postgresql.connection-string = "<database connection string>"
19+
akka.persistence.snapshot-store.plugin = "akka.persistence.snapshot-store.postgresql"
20+
akka.persistence.snapshot-store.postgresql.connection-string = "<database connection string>"
2121
```
2222

2323
Remember that connection string must be provided separately to Journal and Snapshot Store. To finish setup simply initialize plugin using: `PostgreSqlPersistence.Init(actorSystem);`
@@ -29,25 +29,27 @@ Both journal and snapshot store share the same configuration keys (however they
2929
- `class` (string with fully qualified type name) - determines class to be used as a persistent journal. Default: *Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistence.PostgreSql* (for journal) and *Akka.Persistence.PostgreSql.Snapshot.PostgreSqlSnapshotStore, Akka.Persistence.PostgreSql* (for snapshot store).
3030
- `plugin-dispatcher` (string with configuration path) - describes a message dispatcher for persistent journal. Default: *akka.actor.default-dispatcher*
3131
- `connection-string` - connection string used to access PostgreSql database. Default: *none*.
32+
- `connection-string-name` - in case when connection-string is empty, this field specifies entry in the \*.config connection string section, from where connection string will be taken. Default: *none*.
3233
- `connection-timeout` - timespan determining default connection timeouts on database-related operations. Default: *30s*
3334
- `schema-name` - name of the database schema, where journal or snapshot store tables should be placed. Default: *public*
3435
- `table-name` - name of the table used by either journal or snapshot store. Default: *event_journal* (for journal) or *snapshot_store* (for snapshot store)
3536
- `auto-initialize` - flag determining if journal or snapshot store related tables should by automatically created when they have not been found in connected database. Default: *false*
37+
- `timestamp-provider` (journal only) - type of the object used to generate journal event timestamps. Default: *Akka.Persistence.Sql.Common.Journal.DefaultTimestampProvider, Akka.Persistence.Sql.Common*
3638

3739
### Custom SQL data queries
3840

3941
PostgreSql persistence plugin defines a default table schema used for both journal and snapshot store.
4042

4143
**EventJournal table**:
4244

43-
+----------------+-------------+------------+---------------+---------+
44-
| persistence_id | sequence_nr | is_deleted | payload_type | payload |
45-
+----------------+-------------+------------+---------------+---------+
46-
| varchar(200) | bigint | boolean | varchar(500) | bytea |
47-
+----------------+-------------+------------+---------------+---------+
48-
45+
+----------------+-------------+------------+---------------+---------+--------------------------+
46+
| persistence_id | sequence_nr | is_deleted | payload_type | payload | created_at |
47+
+----------------+-------------+------------+---------------+---------+--------------------------+
48+
| varchar(200) | bigint | boolean | varchar(500) | bytea | timestamp with time zone |
49+
+----------------+-------------+------------+---------------+---------+--------------------------+
50+
4951
**SnapshotStore table**:
50-
52+
5153
+----------------+--------------+--------------------------+------------------+---------------+----------+
5254
| persistence_id | sequence_nr | created_at | created_at_ticks | snapshot_type | snapshot |
5355
+----------------+--------------+--------------------------+------------------+--------------------------+
@@ -59,9 +61,9 @@ PostgreSql persistence plugin defines a default table schema used for both journ
5961
Underneath Akka.Persistence.PostgreSql uses the Npgsql library to communicate with the database. You may choose not to use a dedicated built in ones, but to create your own being better fit for your use case. To do so, you have to create your own versions of `IJournalQueryBuilder` and `IJournalQueryMapper` (for custom journals) or `ISnapshotQueryBuilder` and `ISnapshotQueryMapper` (for custom snapshot store) and then attach inside journal, just like in the example below:
6062

6163
```csharp
62-
class MyCustomPostgreSqlJournal: Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal
64+
class MyCustomPostgreSqlJournal: Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal
6365
{
64-
public MyCustomPostgreSqlJournal() : base()
66+
public MyCustomPostgreSqlJournal() : base()
6567
{
6668
QueryBuilder = new MyCustomJournalQueryBuilder();
6769
QueryMapper = new MyCustomJournalQueryMapper();
@@ -85,4 +87,4 @@ In order to run the tests, you must do the following things:
8587
2. Install PostgreSql with the default settings. The default connection string uses the following credentials:
8688
1. Username: postgres
8789
2. Password: postgres
88-
3. A custom app.config file can be used and needs to be placed in the same folder as the dll
90+
3. A custom app.config file can be used and needs to be placed in the same folder as the dll

RELEASE_NOTES.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1+
#### 1.0.5 August 08 2015 ####
2+
3+
- Changed tables schema: renamed payload_type column to manifest for journal and snapshot tables
4+
- Changed tables schema: added created_at column to journal table
5+
- Added compatibility with Persistent queries API
6+
- Added ability to specify connection string stored in \*.config files
7+
18
#### 1.0.4 August 07 2015 ####
29

310
#### 1.0.3 June 12 2015 ####
411
**Bugfix release for Akka.NET v1.0.2.**
512

6-
This release addresses an issue with Akka.Persistence.SqlServer and Akka.Persistence.PostgreSql where both packages were missing a reference to Akka.Persistence.Sql.Common.
13+
This release addresses an issue with Akka.Persistence.SqlServer and Akka.Persistence.PostgreSql where both packages were missing a reference to Akka.Persistence.Sql.Common.
714

815
In Akka.NET v1.0.3 we've packaged Akka.Persistence.Sql.Common into its own NuGet package and referenced it in the affected packages.
916

build.cmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ pushd %~dp0
44

55
src\.nuget\NuGet.exe update -self
66

7-
src\.nuget\NuGet.exe install FAKE -ConfigFile src\.nuget\Nuget.Config -OutputDirectory src\packages -ExcludeVersion -Version 3.28.8
7+
src\.nuget\NuGet.exe install FAKE -ConfigFile src\.nuget\Nuget.Config -OutputDirectory src\packages -ExcludeVersion -Version 4.1.0
88

99
src\.nuget\NuGet.exe install xunit.runner.console -ConfigFile src\.nuget\Nuget.Config -OutputDirectory src\packages\FAKE -ExcludeVersion -Version 2.0.0
1010
src\.nuget\NuGet.exe install nunit.runners -ConfigFile src\.nuget\Nuget.Config -OutputDirectory src\packages\FAKE -ExcludeVersion -Version 2.6.4
1111

12-
if not exist src\packages\SourceLink.Fake\tools\SourceLink.fsx (
12+
if not exist src\packages\SourceLink.Fake\tools\SourceLink.fsx (
1313
src\.nuget\nuget.exe install SourceLink.Fake -ConfigFile src\.nuget\Nuget.Config -OutputDirectory src\packages -ExcludeVersion
1414
)
1515
rem cls
1616

1717
set encoding=utf-8
1818
src\packages\FAKE\tools\FAKE.exe build.fsx %*
1919

20-
popd
20+
popd

src/Akka.Persistence.PostgreSql.Tests/Akka.Persistence.PostgreSql.Tests.csproj

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" />
43
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
54
<PropertyGroup>
65
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -15,7 +14,8 @@
1514
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
1615
<RestorePackages>true</RestorePackages>
1716
<TargetFrameworkProfile />
18-
<NuGetPackageImportStamp>7066842a</NuGetPackageImportStamp>
17+
<NuGetPackageImportStamp>
18+
</NuGetPackageImportStamp>
1919
</PropertyGroup>
2020
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2121
<DebugSymbols>true</DebugSymbols>
@@ -35,23 +35,25 @@
3535
<WarningLevel>4</WarningLevel>
3636
</PropertyGroup>
3737
<ItemGroup>
38-
<Reference Include="Akka">
39-
<HintPath>..\Packages\Akka.1.0.4\lib\net45\Akka.dll</HintPath>
38+
<Reference Include="Akka, Version=1.0.5.14, Culture=neutral, processorArchitecture=MSIL">
39+
<HintPath>..\packages\Akka.1.0.5\lib\net45\Akka.dll</HintPath>
40+
<Private>True</Private>
4041
</Reference>
41-
<Reference Include="Akka.Persistence">
42-
<HintPath>..\Packages\Akka.Persistence.1.0.4.12-beta\lib\net45\Akka.Persistence.dll</HintPath>
42+
<Reference Include="Akka.Persistence, Version=1.0.5.15, Culture=neutral, processorArchitecture=MSIL">
43+
<HintPath>..\packages\Akka.Persistence.1.0.5.15-beta\lib\net45\Akka.Persistence.dll</HintPath>
44+
<Private>True</Private>
4345
</Reference>
44-
<Reference Include="Akka.Persistence.Sql.Common">
45-
<HintPath>..\Packages\Akka.Persistence.Sql.Common.1.0.4.12-beta\lib\net45\Akka.Persistence.Sql.Common.dll</HintPath>
46+
<Reference Include="Akka.Persistence.TestKit, Version=1.0.5.15, Culture=neutral, processorArchitecture=MSIL">
47+
<HintPath>..\packages\Akka.Persistence.TestKit.1.0.5.15-beta\lib\net45\Akka.Persistence.TestKit.dll</HintPath>
48+
<Private>True</Private>
4649
</Reference>
47-
<Reference Include="Akka.Persistence.TestKit">
48-
<HintPath>..\Packages\Akka.Persistence.TestKit.1.0.4.12-beta\lib\net45\Akka.Persistence.TestKit.dll</HintPath>
50+
<Reference Include="Akka.TestKit, Version=1.0.5.14, Culture=neutral, processorArchitecture=MSIL">
51+
<HintPath>..\packages\Akka.TestKit.1.0.5\lib\net45\Akka.TestKit.dll</HintPath>
52+
<Private>True</Private>
4953
</Reference>
50-
<Reference Include="Akka.TestKit">
51-
<HintPath>..\Packages\Akka.TestKit.1.0.4\lib\net45\Akka.TestKit.dll</HintPath>
52-
</Reference>
53-
<Reference Include="Akka.TestKit.Xunit2">
54-
<HintPath>..\Packages\Akka.TestKit.Xunit2.1.0.4\lib\net45\Akka.TestKit.Xunit2.dll</HintPath>
54+
<Reference Include="Akka.TestKit.Xunit2, Version=1.0.5.14, Culture=neutral, processorArchitecture=MSIL">
55+
<HintPath>..\packages\Akka.TestKit.Xunit2.1.0.5\lib\net45\Akka.TestKit.Xunit2.dll</HintPath>
56+
<Private>True</Private>
5557
</Reference>
5658
<Reference Include="Google.ProtocolBuffers">
5759
<HintPath>..\packages\Google.ProtocolBuffers.2.4.1.521\lib\net40\Google.ProtocolBuffers.dll</HintPath>
@@ -79,11 +81,17 @@
7981
<Reference Include="xunit.abstractions">
8082
<HintPath>..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
8183
</Reference>
82-
<Reference Include="xunit.assert">
83-
<HintPath>..\packages\xunit.assert.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.assert.dll</HintPath>
84+
<Reference Include="xunit.assert, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
85+
<HintPath>..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll</HintPath>
86+
<Private>True</Private>
87+
</Reference>
88+
<Reference Include="xunit.core, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
89+
<HintPath>..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll</HintPath>
90+
<Private>True</Private>
8491
</Reference>
85-
<Reference Include="xunit.core">
86-
<HintPath>..\packages\xunit.extensibility.core.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.dll</HintPath>
92+
<Reference Include="xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
93+
<HintPath>..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll</HintPath>
94+
<Private>True</Private>
8795
</Reference>
8896
</ItemGroup>
8997
<ItemGroup>
@@ -112,7 +120,6 @@
112120
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
113121
</PropertyGroup>
114122
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
115-
<Error Condition="!Exists('..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props'))" />
116123
</Target>
117124
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
118125
Other similar extension points exist, see Microsoft.Common.targets.

src/Akka.Persistence.PostgreSql.Tests/PostgreSqlJournalSpec.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
using System.Configuration;
22
using Akka.Configuration;
33
using Akka.Persistence.TestKit.Journal;
4+
using Xunit.Abstractions;
45

56
namespace Akka.Persistence.PostgreSql.Tests
67
{
78
public class PostgreSqlJournalSpec : JournalSpec
89
{
910
private static readonly Config SpecConfig;
1011

11-
static PostgreSqlJournalSpec()
12+
static PostgreSqlJournalSpec()
1213
{
1314
var connectionString = ConfigurationManager.ConnectionStrings["TestDb"].ConnectionString;
1415

@@ -34,8 +35,8 @@ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistenc
3435
DbUtils.Initialize();
3536
}
3637

37-
public PostgreSqlJournalSpec()
38-
: base(SpecConfig, "PostgreSqlJournalSpec")
38+
public PostgreSqlJournalSpec(ITestOutputHelper output)
39+
: base(SpecConfig, "PostgreSqlJournalSpec", output: output)
3940
{
4041
Initialize();
4142
}

src/Akka.Persistence.PostgreSql.Tests/PostgreSqlSnapshotStoreSpec.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System.Configuration;
22
using Akka.Configuration;
33
using Akka.Persistence.TestKit.Snapshot;
4+
using Xunit.Abstractions;
45

56
namespace Akka.Persistence.PostgreSql.Tests
67
{
@@ -34,8 +35,8 @@ class = ""Akka.Persistence.PostgreSql.Snapshot.PostgreSqlSnapshotStore, Akka.Per
3435
DbUtils.Initialize();
3536
}
3637

37-
public PostgreSqlSnapshotStoreSpec()
38-
: base(SpecConfig, "PostgreSqlSnapshotStoreSpec")
38+
public PostgreSqlSnapshotStoreSpec(ITestOutputHelper output)
39+
: base(SpecConfig, "PostgreSqlSnapshotStoreSpec", output: output)
3940
{
4041
Initialize();
4142
}
Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<connectionStrings>
4-
<add name="TestDb" connectionString="Server=localhost;Port=5432;Database=akka_persistence_tests;User Id=postgres;Password=postgres" providerName="Npgsql"/>
4+
<add name="TestDb" connectionString="Server=localhost;Port=5432;Database=akka_persistence_tests;User Id=postgres;Password=postgres" providerName="Npgsql" />
55
</connectionStrings>
6+
<!--<runtime>
7+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
8+
<dependentAssembly>
9+
<assemblyIdentity name="xunit.assert" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral" />
10+
<bindingRedirect oldVersion="0.0.0.0-2.0.0.2929" newVersion="2.0.0.2929" />
11+
</dependentAssembly>
12+
<dependentAssembly>
13+
<assemblyIdentity name="xunit.core" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral" />
14+
<bindingRedirect oldVersion="0.0.0.0-2.0.0.2929" newVersion="2.0.0.2929" />
15+
</dependentAssembly>
16+
</assemblyBinding>
17+
</runtime>-->
18+
<runtime>
19+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
20+
<dependentAssembly>
21+
<assemblyIdentity name="xunit.assert" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral" />
22+
<bindingRedirect oldVersion="0.0.0.0-2.1.0.3179" newVersion="2.1.0.3179" />
23+
</dependentAssembly>
24+
<dependentAssembly>
25+
<assemblyIdentity name="xunit.core" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral" />
26+
<bindingRedirect oldVersion="0.0.0.0-2.1.0.3179" newVersion="2.1.0.3179" />
27+
</dependentAssembly>
28+
</assemblyBinding>
29+
</runtime>
630
</configuration>
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Akka" version="1.0.4" targetFramework="net45" />
4-
<package id="Akka.Persistence" version="1.0.4.12-beta" targetFramework="net45" />
5-
<package id="Akka.Persistence.Sql.Common" version="1.0.4.12-beta" targetFramework="net45" />
6-
<package id="Akka.Persistence.TestKit" version="1.0.4.12-beta" targetFramework="net45" />
7-
<package id="Akka.TestKit" version="1.0.4" targetFramework="net45" />
8-
<package id="Akka.TestKit.Xunit2" version="1.0.4" targetFramework="net45" />
3+
<package id="Akka" version="1.0.5" targetFramework="net45" />
4+
<package id="Akka.Persistence" version="1.0.5.15-beta" targetFramework="net45" />
5+
<package id="Akka.Persistence.TestKit" version="1.0.5.15-beta" targetFramework="net45" />
6+
<package id="Akka.TestKit" version="1.0.5" targetFramework="net45" />
7+
<package id="Akka.TestKit.Xunit2" version="1.0.5" targetFramework="net45" />
98
<package id="Google.ProtocolBuffers" version="2.4.1.521" targetFramework="net45" />
109
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
1110
<package id="Npgsql" version="2.2.5" targetFramework="net45" />
12-
<package id="xunit" version="2.0.0" targetFramework="net45" />
11+
<package id="xunit" version="2.1.0" targetFramework="net45" />
1312
<package id="xunit.abstractions" version="2.0.0" targetFramework="net45" />
14-
<package id="xunit.assert" version="2.0.0" targetFramework="net45" />
15-
<package id="xunit.core" version="2.0.0" targetFramework="net45" />
16-
<package id="xunit.extensibility.core" version="2.0.0" targetFramework="net45" />
13+
<package id="xunit.assert" version="2.1.0" targetFramework="net45" />
14+
<package id="xunit.core" version="2.1.0" targetFramework="net45" />
15+
<package id="xunit.extensibility.core" version="2.1.0" targetFramework="net45" />
16+
<package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net45" />
1717
</packages>

0 commit comments

Comments
 (0)