-
Notifications
You must be signed in to change notification settings - Fork 17
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
Automatically add default Akka.Streams HOCON #489
Conversation
This is in response to a customer issue where the following happened: 1. Using `StreamRef`s 2. Transmits a `StreamRef` to a node that has never called any materialization functions 3. Serialization error due to missing serializer definitions. In normal Akka.NET you'd have to fix this by manually appending `ActorMaterializer.DefaultConfig()` as a fallback. In Akka.Hosting we can just do this automatically at startup.
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.
Detailed my changes
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.
Just some C# modernization
@@ -11,6 +11,7 @@ | |||
|
|||
<ItemGroup> | |||
<PackageReference Include="Akka.DependencyInjection" Version="$(AkkaVersion)" /> | |||
<PackageReference Include="Akka.Streams" Version="$(AkkaVersion)" /> |
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.
We need to move this project to centralized package management
// add the default Akka.Streams configuration by default - hurts nothing, but | ||
// ensures that StreamRefs work correctly out of the box in case users | ||
// haven't attempted to materialize a stream yet | ||
b.AddHocon(ActorMaterializer.DefaultConfig(), HoconAddMode.Append); |
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.
Added the HOCON here - it can be in Append mode because it's just the defaults - it can go at the end of the line.
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.
More C# modernization.
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
This reverts commit d7cf636.
Changes
This is in response to a customer issue where the following happened:
StreamRef
sStreamRef
to a node that has never called any materialization functionsIn normal Akka.NET you'd have to fix this by manually appending
ActorMaterializer.DefaultConfig()
as a fallback. In Akka.Hosting we can just do this automatically at startup.I added a reference to Akka.Streams in the default Akka.Hosting module. There's not a lot of value in making a custom Akka.Streams.Hosting package as "add this config" is the only method that would be in it. If there's a good reason why we shouldn't add it to the default Akka.Hosting package, please say so in a review.
Checklist
For significant changes, please ensure that the following have been completed (delete if not relevant):