Giter Club home page Giter Club logo

akka.persistence.azure's Introduction

Akka.Persistence.Azure Build status NuGet Pre Release

Akka Persistence journal and snapshot store backed by Azure Table database.

Configuration

Both journal and snapshot store share the same configuration keys (however they resides in separate scopes, so they are defined distinctly for either journal or snapshot store):

Remember that connection string must be provided separately to Journal and Snapshot Store.

akka.persistence {
    journal {
        azure-table {
            # qualified type name of the Azure Storage Table persistence journal actor
            class = "Akka.Persistence.AzureTable.Journal.AzureTableJournal, Akka.Persistence.AzureTable"

            # dispatcher used to drive journal actor
            plugin-dispatcher = "akka.actor.default-dispatcher"

			# connection string used for database access
			connection-string = "UseDevelopmentStorage=true"

			# table storage table corresponding with persistent journal
			table-name = events

			# metadata table
			metadata-table-name = metadata

			# should corresponding journal table be initialized automatically
			auto-initialize = off
        }
    }
    snapshot-store {
        azure-table {
            # qualified type name of the Azure Storage Table persistence snapshot-store actor
            class = "Akka.Persistence.AzureTable.Snapshot.AzureSnapshotStore, Akka.Persistence.AzureTable"

            # dispatcher used to drive snapshot-store actor
            plugin-dispatcher = "akka.actor.default-dispatcher"

			# connection string used for database access
			connection-string = "UseDevelopmentStorage=true"

			# table storage table corresponding with persistent snapshot-store
			table-name = snapshots

			# should corresponding snapshot-store table be initialized automatically
			auto-initialize = off
        }
    }    
}

Serialization

Azure plugin uses Json.Net to serialize all payloads

akka.persistence.azure's People

Contributors

alexvaluyskiy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

akka.persistence.azure's Issues

system is unable to`"find/use" this extension

Hi, when I use this plugin my system is unable to find the plugin, which leads to the inmmemory/local storage default option always being used. When debugging and looking at the actors in the system the JournalPluginId = null, and Journal = akka/myActorsystem/../...../journal.inmemm#13213

Do the use of the plugin need to be specified explicitly somewhere?
In the getakka documentation they specify which plugin is used for journal:
journal {
# Absolute path to the journal plugin configuration entry used by
# persistent actor or view by default.
# Persistent actor or view can override journalPluginId method
# in order to rely on a different journal plugin.
plugin = "akka.persistence.journal.inmem"

Does this azure plugin require something similar?
Do you have any other suggestions to troubleshooting approaches to why my system is unable to "find/use" this plugin?

Here is my config:

var config = ConfigurationFactory.ParseString(@"
akka.persistence {
journal {
azure-table {
# qualified type name of the Azure Storage Table persistence journal actor
class = ""Akka.Persistence.AzureTable.Journal.AzureTableJournal, Akka.Persistence.AzureTable""

        # dispatcher used to drive journal actor
        plugin-dispatcher = ""akka.actor.default-dispatcher""

        # connection string used for database access
        connection-string = ""myconnectionstringtoazuredb""

        # table storage table corresponding with persistent journal
        table-name = events

        # metadata table
        metadata-table-name = metadata

        # should corresponding journal table be initialized automatically
        auto-initialize = on
    }
}
snapshot-store {
    azure-table {
        # qualified type name of the Azure Storage Table persistence snapshot-store actor
        class = ""Akka.Persistence.AzureTable.Snapshot.AzureSnapshotStore, 
                 Akka.Persistence.AzureTable""

       # dispatcher used to drive snapshot-store actor
       plugin-dispatcher = ""akka.actor.default-dispatcher""

  # connection string used for database access
  connection-string = ""myconnectionstringtoazuredb""

   # table storage table corresponding with persistent snapshot-store
   table-name = snapshots

       # should corresponding snapshot-store table be initialized automatically
       auto-initialize = off

}
}
}");

        MyActorSystem= ActorSystem.Create("MyActorSystem", config);

any help appreciated.

OutOfRangeInput caused by '/' in the PartitionKey & RowKey

I get OutOfRangeInput failures which seems to origin from the fact that the PatitionKey & RowKey contains the '/' character. PartitionKey & RowKey must not contain the '/' character according to microsoft.

https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Understanding-the-Table-Service-Data-Model?redirectedfrom=MSDN

This since they seem to be set to the patj of a actor. Is this by design or have I configured the journal etc. in some faulty way?

Exception:

Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (400) Bad Request. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
at Microsoft.WindowsAzure.Storage.Table.Protocol.TableOperationHttpResponseParsers.TableOperationPreProcess(TableResult result, TableOperation operation, HttpWebResponse resp, Exception ex) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Table\Protocol\TableOperationHttpResponseParsers.cs:line 53
at Microsoft.WindowsAzure.Storage.Table.TableOperation.<>c__DisplayClass4.b__2(RESTCommand1 cmd, HttpWebResponse resp, Exception ex, OperationContext ctx) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Table\TableOperation.cs:line 133 at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndGetResponse[T](IAsyncResult getResponseResult) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 299 --- End of inner exception stack trace --- at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndExecuteAsync[T](IAsyncResult result) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 50 at Microsoft.WindowsAzure.Storage.Table.CloudTable.EndExecute(IAsyncResult asyncResult) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Table\CloudTable.cs:line 95 at Microsoft.WindowsAzure.Storage.Core.Util.AsyncExtensions.<>c__DisplayClass11.b__0(IAsyncResult ar) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Util\AsyncExtensions.cs:line 66
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Akka.Persistence.AzureTable.Journal.AzureTableJournal.d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Akka.Persistence.AzureTable.Journal.AzureTableJournal.d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Akka.Util.Internal.AtomicState.d__71.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Akka.Util.Internal.AtomicState.<CallThrough>d__71.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Akka.Pattern.Closed.d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Akka.Pattern.CircuitBreaker.<WithCircuitBreaker>d__321.MoveNext()
Request Information
RequestID:756ce1be-0ef4-42dd-a26d-3df1a16ed2ef
RequestDate:Sat, 01 Apr 2017 22:52:30 GMT
StatusMessage:Bad Request
ErrorCode:OutOfRangeInput

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.