From 2fe532bb4b3a955ae3aab9dcf621a18a8e005904 Mon Sep 17 00:00:00 2001 From: Igor Fedchenko Date: Fri, 10 Jul 2020 18:37:44 +0300 Subject: [PATCH] Updated readme with configuration hints (#100) * Fixed indent * Updated readme * Fixed config indent * Converted tabs to spaces in reference.conf --- README.md | 19 ++++++ src/Akka.Persistence.Azure/reference.conf | 78 +++++++++++------------ 2 files changed, 58 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index b8b39bf..26825e5 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,25 @@ Akka.Persistence implementation that uses Windows Azure table and blob storage. +## Configuration + +Here is a default configuration used by this plugin: https://github.com/petabridge/Akka.Persistence.Azure/blob/dev/src/Akka.Persistence.Azure/reference.conf + +You will need to provide connection string and Azure Table name for journal, and connection string with container name for Azure Blob Store: +``` +# Need to enable plugin +akka.persistence.journal.plugin = akka.persistence.journal.azure-table +akka.persistence.snapshot-store.plugin = akka.persistence.snapshot-store.azure-blob-store + +# Configure journal +akka.persistence.journal.azure-table.connection-string = "Your Azure Storage connection string" +akka.persistence.journal.azure-table.table-name = "Your table name" + +# Configure snapshots +akka.persistence.snapshot-store.azure-blob-store.connection-string = "Your Azure Storage connection string" +akka.persistence.snapshot-store.azure-blob-store.container-name = "Your container name" +``` + ## Building this solution To run the build script associated with this solution, execute the following: diff --git a/src/Akka.Persistence.Azure/reference.conf b/src/Akka.Persistence.Azure/reference.conf index 39fb63f..07f9475 100644 --- a/src/Akka.Persistence.Azure/reference.conf +++ b/src/Akka.Persistence.Azure/reference.conf @@ -11,19 +11,19 @@ akka.persistence { # connection string, as described here: https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string connection-string = "" - # the name of the Windows Azure Table used to persist journal events - table-name = "AkkaPersistenceDefaultTable" - - # Initial timeout to use when connecting to Azure Storage for the first time. - connect-timeout = 3s - - # Timeouts for individual read, write, and delete requests to Azure Storage. - request-timeout = 3s - - # Toggle for verbose logging. Logs individual requests to Azure. - # Intended only for debugging purposes. akka.loglevel must be set to DEBUG - # in order for this setting to be effective. - verbose-logging = off + # the name of the Windows Azure Table used to persist journal events + table-name = "AkkaPersistenceDefaultTable" + + # Initial timeout to use when connecting to Azure Storage for the first time. + connect-timeout = 3s + + # Timeouts for individual read, write, and delete requests to Azure Storage. + request-timeout = 3s + + # Toggle for verbose logging. Logs individual requests to Azure. + # Intended only for debugging purposes. akka.loglevel must be set to DEBUG + # in order for this setting to be effective. + verbose-logging = off # dispatcher used to drive journal actor plugin-dispatcher = "akka.actor.default-dispatcher" @@ -32,19 +32,19 @@ akka.persistence { query { journal { - azure-table { - # Implementation class of the Azure ReadJournalProvider - class = "Akka.Persistence.Azure.Query.AzureTableStorageReadJournalProvider, Akka.Persistence.Azure" - - # Absolute path to the write journal plugin configuration entry that this - # query journal will connect to. - # If undefined (or "") it will connect to the default journal as specified by the - # akka.persistence.journal.plugin property. - write-plugin = "" - - # How many events to fetch in one query (replay) and keep buffered until they - # are delivered downstreams. - max-buffer-size = 100 + azure-table { + # Implementation class of the Azure ReadJournalProvider + class = "Akka.Persistence.Azure.Query.AzureTableStorageReadJournalProvider, Akka.Persistence.Azure" + + # Absolute path to the write journal plugin configuration entry that this + # query journal will connect to. + # If undefined (or "") it will connect to the default journal as specified by the + # akka.persistence.journal.plugin property. + write-plugin = "" + + # How many events to fetch in one query (replay) and keep buffered until they + # are delivered downstreams. + max-buffer-size = 100 # The Azure Table write journal is notifying the query side as soon as things # are persisted, but for efficiency reasons the query side retrieves the events @@ -63,20 +63,20 @@ akka.persistence { connection-string = "" # the name of the Windows Azure Blob Store container used to persist snapshots - container-name = "akka-persistence-default-container" - - # Initial timeout to use when connecting to Azure Storage for the first time. - connect-timeout = 3s - - # Timeouts for individual read, write, and delete requests to Azure Storage. - request-timeout = 3s - - # Toggle for verbose logging. Logs individual requests to Azure. - # Intended only for debugging purposes. akka.loglevel must be set to DEBUG - # in order for this setting to be effective. - verbose-logging = off + container-name = "akka-persistence-default-container" + + # Initial timeout to use when connecting to Azure Storage for the first time. + connect-timeout = 3s + + # Timeouts for individual read, write, and delete requests to Azure Storage. + request-timeout = 3s + + # Toggle for verbose logging. Logs individual requests to Azure. + # Intended only for debugging purposes. akka.loglevel must be set to DEBUG + # in order for this setting to be effective. + verbose-logging = off - # dispatcher used to drive snapshot storage actor + # dispatcher used to drive snapshot storage actor plugin-dispatcher = "akka.actor.default-dispatcher" } }