Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • Sep 17 17:14
    briansain commented #4567
  • Sep 17 16:59
    briansain synchronize #4568
  • Sep 17 16:27
    VaclavK closed #51
  • Sep 17 16:27
    VaclavK closed #50
  • Sep 15 14:57
    BartHuls closed #4569
  • Sep 15 14:18
    Aaronontheweb commented #4563
  • Sep 15 13:53
    Zetanova commented #4563
  • Sep 15 13:41
    Aaronontheweb commented #4563
  • Sep 15 13:38
    Zetanova commented #4563
  • Sep 15 13:28
    Zetanova commented #4563
  • Sep 15 13:15
    Aaronontheweb commented #4567
  • Sep 15 13:11
    Aaronontheweb commented #4569
  • Sep 15 09:59
    BartHuls commented #4569
  • Sep 13 16:51
    to11mtm commented #4568
  • Sep 11 18:45
    briansain synchronize #4568
  • Sep 11 16:18
    briansain commented #4567
  • Sep 11 15:50
    briansain commented #4567
  • Sep 11 15:37
    ismaelhamed commented #4567
  • Sep 11 15:24
    dependabot-preview[bot] synchronize #146
  • Sep 11 15:24

    dependabot-preview[bot] on nuget

    Bump AkkaVersion from 1.4.9 to … (compare)

@Horusiath I'm using the SQL Server driver at the moment. Happy to switch if this is causing the issue.
I am looking at akka net clustering using Consul for discovery. Is anyone running a similar setup? [ was looking at but that requires seed nodes to be available using the public-host + port (not public port) which is not my case ] . I was thinking on a simple solution in which each "node" is registering using "consul/service" tag, distinguishing itself by service name and tag. than akka query these when a node is starting it tries to join one of the registered nodes in the cluster, on success it will register itself or just start emitting a healthy healthcheck. Is that some sound or anyone has some advise here.
Hi. Who can tell me how to make one message just handle once in shard ?
Bartosz Sypytkowski
@heyixiaoran have you read this post? You should have this and more answers there:
Onur Gumus
does cluster sharding provide message delivery guarantee as long as sender node is alive?
Hi, friends!

Hi guys, i have a question.

I generated a huge amount of message and sending these message to a remote actor. Then i connection is closed and quarantined by system, after getting following warnings.

[WARNING] ... You should probably implement flow control to avoid flooding the remote connection.

Is it quarantined because of the catastrophic communication?
Is it possible to throttling messages? Any suggestions to avoid this issue?


@Horusiath I found sender can set shardId. But receiver can not set shardId . So I have sender1 to send message to shardId1 and sender2 to send message to shardId2 . How to set receiver1 just receive the message from sender1 and receiver2 just receive the message from sender2 ?
sender :

            var shardRegion = ClusterSharding.Get(system).Start(
                    new MessageExtractor());

                for (int i = 0; i < 100; i++)
                    shardRegion.Tell(new ShardEnvelope("1", "1", "TestFromSender1"));    // or  shardRegion.Tell(new ShardEnvelope("2", "1", "TestFromSender1")); 


              var clusterSharding = ClusterSharding.Get(system);
                SenderShardActor = clusterSharding.StartProxy(nameof(SenderActor), Roles.Sharding, new MessageExtractor());  //Did I miss any settings  at here?

                ReceiverActor = system.ActorOf<ReceiverActor>("receiver");
Bartosz Sypytkowski
@heyixiaoran sorry but your naming is bit confusing. I don't get, what are you trying to achieve in your 'receiver' snippet. What is sender/receiver in your context?
Aaron Stannard
@HIPERCUBE looks like you're just sending messages to Akka.Remote faster than remoting can process it
suggestions are to either implement flow control - throttle the rate at which you hand messages off to akka.remote
or do some things that will help remoting work faster, like not using JSON.NET as your serializer

@Aaronontheweb Somehow your 'looks cool' comment about my job scheduler gave me some encouragement... After getting some feedback from my normal work job team, I did some refactoring... I now have an example where various actors in a pipeline can get Jobs as wire-friendly results aggregated in a collection , such that the final effects of a command can be committed atomically.

I think it could be a great way to bridge the gap for distributed systems into scenarios where people want transactional behavior with minimum effort

Aaron Stannard
keep going I say
would be great to see more tools like that out in the .NET space
there's definitely demand for distributed scheduling capabilities
@Horusiath sender is a send message node and receiver is a receive message node. They are both project name. I want to run multi send nodes and receive nodes . for example. run sender1 ,sender2 , receiver1. Then sender1 send message to shardid=1,entityid=1 and sender2 send message to shardid= 2,entityid=2 . I want receiver1 receive message from sender1 and sender2. Now I run a receiver2. Because it will rebalance . So I think receiver1 will receive message from sender1 and receiver2 will receive message from sender2. Do I miss some thing about rebalance ?
Bartosz Sypytkowski

@heyixiaoran if you have two nodes (both running sharding), they will split new shards more or less evenly. But if you have already have a node with few shards on it, and then add new node to a cluster, the shards from old node don't have to migrate to new node immediately.

The heuristic here is that shard migration process is expensive, therefore it doesn't occur right away and it doesn't have to occur if difference in number of shards hosted between nodes is too small. Only if nodes have substantial difference between number of hosted shards (see reference config), a rebalancing will occur.

at least this is the default behavior
@Horusiath So If I'm afraid one node will crush. Run two receiver node. I still don't know how to make receiver1 receive half messages and receiver2 receive other half messages.
Bartosz Sypytkowski
@heyixiaoran cluster sharding is about fair allocation of actors/shards, not about fair splitting the message workload. This is what Cluster Routers excel in.

Hey everyone. I've been using cluster sharding in a development/CI environment for a while now and this error I'm getting is a recurring theme. The only way I can get my application back on track is to clear the event journal and allow the application to start from fresh...
Is there a bug here or have I configured something incorrectly?
I am using Kubernetes pods so each deployment will (or is highly likely to) have a new address. As the error states, there is no region deployed to that address (verified by lighthouse and PBM tool)
If I'm correct, in this instance, should the shard region not be reallocated?

[09:59:17 ERR] Exception in ReceiveRecover when replaying event type [Akka.Cluster.Sharding.PersistentShardCoordinator+ShardHomeAllocated] with sequence number [9] for persistenceId [/system/sharding/customerCoordinator/singleton/coordinator]
System.ArgumentException: Region [akka.tcp://imburse@] not registered
Parameter name: e
   at Akka.Cluster.Sharding.PersistentShardCoordinator.State.Updated(IDomainEvent e)
   at Akka.Cluster.Sharding.PersistentShardCoordinator.ReceiveRecover(Object message)
   at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
   at Akka.Persistence.Eventsourced.<>c__DisplayClass91_0.<Recovering>b__1(Receive receive, Object message)

Sorry to be a pain but I'm not sure whether this is poor configuration (on my part) or if I should chalk this up as a bug. Does anyone have experience with how shard regions are allocated/reallocated?

Bartosz Sypytkowski
@dubs999 it looks like your journal is corrupted for some reason. Your shard coordinator tries to recreate its state based on the journal, sees that shard has been allocated for the region that was not registered before (which is pretty impossible, since this is recovery mode, so it was correctly handled when storing an event first time). Did you delete events from your journal or something?
@Horusiath We don't have any code which deletes journals or snapshots. We're currently using SQL server, although only to maintain the current actor system state in the three EventJournal SnapshotStore and Metadata tables.
I'm under the assumption that the data was corrupted during a release. Maybe the actor system was downed before enough gossip/state was able to be written.
Our current infrastructure (Kubernetes) will re-deploy our stateless-set of shard-nodes at new addresses to those known by the Event Journal. Is this a potential limitation of the Cluster.Sharding module? I accept that it's in BETA.
Annoyingly I don't have a guaranteed repro for this but it has happened maybe 3 times this month (whilst still in development/CI)
Bartosz Sypytkowski
@dubs999 I see that in the example log you have there, your sequence number is 9. Could you provide rows that happened before this seq nr for this persistenceId? SeqNr/PersistenceId/Manifest/SerializerId columns are actually the most important
@Horusiath I feel a bit silly for not taking a copy of the data! We had to purge the data to allow the application to function again. I'll have to get back to you with that next time it occurs.
I think I've found an open ticket for this already here: akkadotnet/
Bartosz Sypytkowski
ok, I see it
@Horusiath Does shard just can have multi sender and one receiver ? It doesn't seem to be what I need . I want to use in a trading system. I want to set each login user as an actor and multiple server actors handle business . After server actor handle the message . It can reply the result to request actor. Does router can do this?
Bartosz Sypytkowski

@heyixiaoran looks like you're talking about two different things:

  • If you have i.e. 10 000 users (actors) sharded on 10 nodes, you can get around (usually not exactly) 1000 actors on each node. That is fair actors allocation.
  • But that doesn't guarantee fair message distribution: you can have one actor receiving 1000 messages/sec and others having 1 message/sec.

It's like difference between memory and CPU.

If you want to model users as actors, then cluster sharding is probably what you're looking for. They can always reply to requester (however replying to sharded actor works in a different way than replying to normal actor).
I still have the issue, that ActorSelection.ResolveOne does not find an Actor that was created using ActorOfAsTestActorRef. What I now tried is Ask<>()-ing the Actor
something before trying to resolve it, and ideed I get an answer to the Ask<>(), but it still happens that ResolveOne does not find it. I tried looking in the source-code
of ActorSelection / ActorOfAsTestActorRef, but at some point I got stuck and could not understand what was going on... Only thing I think I understood, is that someone must answer with ActorIdentity(MsgId, null) upon receiving an Identify(MsgId)-Message... Any good Ideas ?

@Horusiath The issue happened again. Here is a dump of the data.

Ordering PersistenceId SequenceNr Timestamp IsDeleted Manifest Payload Tags SerializerId
136 /system/sharding/customerCoordinator/singleton/coordinator 105 636783291061582824 0 AF 0x0A0233361248616B6B612E7463703A2F2F696D62757273654031302E3234302E302E3130383A383038312F73797374656D2F7368617264696E672F637573746F6D65722331363635343832363933 NULL 13
140 /system/sharding/customerCoordinator/singleton/coordinator 106 636784965012362487 0 AB 0x0A47616B6B612E7463703A2F2F696D62757273654031302E3234302E302E3132323A383038312F73797374656D2F7368617264696E672F637573746F6D657223323432333036343237 NULL 13
141 /system/sharding/customerCoordinator/singleton/coordinator 107 636784965012552987 0 AC 0x0A4C616B6B612E7463703A2F2F696D62757273654031302E3234302E302E35333A383038312F73797374656D2F7368617264696E672F637573746F6D657250726F78792332313137333131313037 NULL 13
142 /system/sharding/customerCoordinator/singleton/coordinator 108 636784965012782458 0 AC 0x0A4D616B6B612E7463703A2F2F696D62757273654031302E3234302E302E3132363A383038312F73797374656D2F7368617264696E672F637573746F6D657250726F78792331323135343337333535 NULL 13
143 /system/sharding/customerCoordinator/singleton/coordinator 109 636784965126035293 0 AD 0x0A46616B6B612E7463703A2F2F696D62757273654031302E3234302E302E33303A383038312F73797374656D2F7368617264696E672F637573746F6D657223393630383739383036 NULL 13
144 /system/sharding/customerCoordinator/singleton/coordinator 110 636784965229904859 0 AB 0x0A46616B6B612E7463703A2F2F696D62757273654031302E3234302E302E31343A383038312F73797374656D2F7368617264696E672F637573746F6D657223373231343333303930 NULL 13

With the exception:

Exception in ReceiveRecover when replaying event type ["Akka.Cluster.Sharding.PersistentShardCoordinator+ShardHomeAllocated"] with sequence number [105] for persistenceId ["/system/sharding/customerCoordinator/singleton/coordinator"]

  "Depth": 0,
  "ClassName": "",
  "Message": "Region [akka.tcp://imburse@] not registered\nParameter name: e",
  "Source": "Akka.Cluster.Sharding",
  "StackTraceString": "   at Akka.Cluster.Sharding.PersistentShardCoordinator.State.Updated(IDomainEvent e)\n   at Akka.Cluster.Sharding.PersistentShardCoordinator.ReceiveRecover(Object message)\n   at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)\n   at Akka.Persistence.Eventsourced.<>c__DisplayClass91_0.<Recovering>b__1(Receive receive, Object message)",
  "RemoteStackTraceString": "",
  "RemoteStackIndex": -1,
  "HResult": -2147024809,
  "HelpURL": null

Would you like me to create this as a bug in the issue tracker?

Lutando Ngqakaza
I have quite a specific question, is it possible to inject an EventAdapter for a given persistence plugin outside of the hocon methodology, something at runtime where I can use an Extension to do this? Long shot question basically I want to add an event tagger to the actor system
Aaron Stannard
@dubs999 yes please
Bartosz Sypytkowski
@Lutando unfortunately no. Only via HOCON

Hi Guys, I have a question regardig FlowOps.GroupedWithin()
A small timing Diagram:

==> Time-Axis

| e e e e e e e          .e e e e e e 
              #          .       #  x              #
              #          .       #  x              #
              #          |-------#t-x|--------t----#---|
              #                  #  x              #
              1                  2  x              3

GroupedWihin emits when the amount of grouped elements reaches the defined limit, or the time since the last emitted group exceeds the defined timeout.
In my example GroupedWithin(6, t) this will emit a complete group at time 1, another partially filled group (4 elements) at time 2 and another parially filled group (2 elements) at time 3.
I need a behaviour, that emits when the amount of grouped element reaches the defined limit, or the time since the first received element of the current group exceeds the defined timeout... That would emit the first group at time 1, and the next completely filled group at time 4.
Is there such a Grouping behaviour ?

Maciek Misztal

I've just tried using Akka.Quartz.Actor.QuartzActor using Akka.System.ActorOf(Props.Create(() => new QuartzActor()), "scheduler"); in a .net core 2.1 app and got a:

[akka://System/user/scheduler#154807920]: Akka.Actor.ActorInitializationException: Exception during creation ---> System.TypeLoadException: Error while creating actor instance of type Akka.Quartz.Actor.QuartzActor with 0 args: () ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
   at Quartz.Impl.StdSchedulerFactory.Initialize()
   at Quartz.Impl.StdSchedulerFactory.GetScheduler() in c:\projects\quartznet\src\Quartz\Impl\StdSchedulerFactory.cs:line 1102
   at Akka.Quartz.Actor.QuartzActor..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean skipCheckThis, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at Akka.Actor.Props.ActivatorProducer.Produce()
   at Akka.Actor.Props.NewActor()
   --- End of inner exception stack trace ---
   at Akka.Actor.Props.NewActor()
   at Akka.Actor.ActorCell.CreateNewActorInstance()
   at Akka.Actor.ActorCell.<>c__DisplayClass109_0.<NewActor>b__0()
   at Akka.Actor.ActorCell.UseThreadContext(Action action)
   at Akka.Actor.ActorCell.NewActor()
   at Akka.Actor.ActorCell.Create(Exception failure)
   --- End of inner exception stack trace ---
   at Akka.Actor.ActorCell.Create(Exception failure)
   at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)

any suggestions how to get rid of this? I take it, this extension is not under active development? From the initial looks of it, it seems to be targeting .NET 4.5.2 ?

Bartosz Sypytkowski
@mmisztal1980 it looks so. Maybe it wasn't updated for a while? You could give a try to Akka.Persistence.Reminders - it's a bit simpler, and relies only on akka persistence. If you try it, your feedback will be welcome.
Maciek Misztal
@horusiath I’l give it a shot
Filip Nowak
Hi, I'm a newbie in the world. I readed a lot about it and I like it very much. But I still doesn't understand one thing: for example, if I'd like to create an eshop with using and I've a catalog with 100000 items. Where are these items stored? Will I have a 100000 actors, one per a catalog item? I'm sorry for the stupid question, I'm coming from relational database centric development world, so this I still dont understand. Many thanks.
Vagif Abilov
Hello. We are using cluster sharding in a combination with DistributedData. DistributedData is still marked as "experimental" in Akka.NET docs, but are there any known issues with it? The documentation says "At this moment this mode doesn't support akka.cluster.sharding.remember-entities option", but this line has been there since the version 1.3.2, and I hope that remember-entities can be used now with ddata (we need it badly). Does anyone know the current state of this issue?
Am I right in thinking that DistributedData is an in-memory, i.e. non-persistent store? What would remember-entities do when backing onto such a system?
Paweł Bańka
@jameswilddev remember-entities is a setting that causes automatic starting of entities in case of shard rebalancing. Yes DistributedData is in-memory, but as long as there are some nodes of the cluster left (which is a case in of moving a shard from one node to another) the data should be still accessible. Note that JVM Akka supports this (
Ismael Hamed
@pmbanka @object @jameswilddev At least in the JVM, since 2.5 remember entities are stored with durable ddata. Given DistributedData in Akka.NET uses LMDB too, I'm guessing it should do the same.
Alexandr Baranovskyi
Wanted to ask a quick question, is it possible to set two lighthouses as seed-nodes for each other?
I tried to do it, but both of them get stuck in infinite loops of reconnection.
However, once I remove the cycle (delete one of the references) everything goes back to normal.
Maciek Misztal
Can anyone elaborate if it’s feasible to create actor hierarchies running in shards?
Boris Lange
Hey, i have a question concerning stateful/persistent actors in general. we have actors and their state is represented via domain models. some of those domain models have other domain models as nested entities. we naively just assigned the state of actors as the nested properties of other actors state objects and recently found out that after restart and recovery, updating the original actor state will not update the (prior same) objects that are nested in others actors state. now my question: what is the best design choice for having stateful/persistent actors, with nested state properties of other actors and have them being updated by just updating the primary actors state?
should we only ever store ids/actorrefs of nested actors state and resolve their state when performing actions where we need their data or are c# refs a solution (ptr-ish)? or is there a solution that we are just missing?