-
Notifications
You must be signed in to change notification settings - Fork 18
Adding Hosting Extensions for Akka.Persistence.Redis #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall all these changes are consistent with other implementations.
One thing I was thinking about is there a standard persistence example that could be copied and used in this project as an example project. The current examples look quite focused on performance opposed to showing the functionality.
| this AkkaConfigurationBuilder builder, | ||
| string configurationString, | ||
| PersistenceMode mode = PersistenceMode.Both, | ||
| bool autoInitialize = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not able to determine if autoInitialize is something that is even needed in something like Redis but I have left it to be consistent.
| /// </exception> | ||
| public static AkkaConfigurationBuilder WithRedisPersistence( | ||
| this AkkaConfigurationBuilder builder, | ||
| string configurationString, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Through out the solution there is an inconsistency where the setting is called configuration string but all the documentation refers to it as a connection string. The changes matches what has originally been in place. This can be changed to normalise on connection string if needed
| # connection string, as described here: https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/Configuration.md#basic-configuration-strings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see why this can be a confusion point, Redis themselves called it "Configuration" (https://stackexchange.github.io/StackExchange.Redis/Configuration.html)
|
|
||
| ### Parameters | ||
|
|
||
| * `configurationString` __string__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another example of the configuration vs connection string
| #nullable enable | ||
| namespace Akka.Persistence.Redis.Hosting; | ||
|
|
||
| public class RedisJournalOptions : JournalOptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The redis journal and snapshot options are separate classes but set exactly the same properties in different hocon sections.
|
Looking at build that was done to verify this PR it seems like tests are not getting picked up during the build process It looks like this stopped somewhere during the move to central packages I can see that the Mongo build.fsx has some extra entries referring to runtime etc but what I cant see is where any of this is referenced in the rest of the fsx fie |
|
PR validation CI/CD should work now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM

Changes
This adds the Akka.Persistence.Redis.Hosting library to enable users to make use of the Akka Hosting approach instead of requiring hocon.
The changes made are quite heavily inspired by the MongoDb version of this change akkadotnet/Akka.Persistence.MongoDB#331
Checklist
For significant changes, please ensure that the following have been completed (delete if not relevant):