Skip to content

Commit

Permalink
[Akka.NET v1.5.15 upgrade] introduced AK1001 bug (#150)
Browse files Browse the repository at this point in the history
* introduced `AK1001` bug

* upgraded to Akka.NET v1.5.15
  • Loading branch information
Aaronontheweb authored Jan 10, 2024
1 parent 4cb76c7 commit 9eec062
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<NetRuntime>net6.0</NetRuntime>
<XunitVersion>2.4.2</XunitVersion>
<TestSdkVersion>17.6.0</TestSdkVersion>
<AkkaVersion>1.5.7</AkkaVersion>
<PbmVersion>1.3.1</PbmVersion>
<AkkaHostingVersion>1.5.5</AkkaHostingVersion>
<AkkaVersion>1.5.15</AkkaVersion>
<PbmVersion>1.3.2</PbmVersion>
<AkkaHostingVersion>1.5.15</AkkaHostingVersion>
<MicrosoftExtensionsVersion>[7.0.0,)</MicrosoftExtensionsVersion>
</PropertyGroup>
<!-- SourceLink support for all Akka.NET projects -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ public ProductTotalsActor(string persistenceId)
var response = State.ProcessCommand(cmd);
var sentResponse = false;

var sender = Sender;

if (response.ResponseEvents.Any())
{
PersistAll(response.ResponseEvents, productEvent =>
Expand All @@ -66,7 +64,15 @@ public ProductTotalsActor(string persistenceId)
if (!sentResponse) // otherwise we'll generate a response-per-event
{
sentResponse = true;
sender.Tell(response);

async Task<ProductCommandResponse> ReplyToSender()
{
await Task.Delay(1);
return response;
}
var sender = Sender;
ReplyToSender().PipeTo(sender, failure: ex => new Status.Failure(ex));

}

if(LastSequenceNr % 10 == 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ public sealed class ProductMessageRouter : HashCodeMessageExtractor
return productId.ProductId;
}

// need this for remember-entities
if (message is ShardRegion.StartEntity se)
return se.EntityId;

return null;
}
}

0 comments on commit 9eec062

Please sign in to comment.