Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 13:36
    Aaronontheweb commented #3973
  • 13:34
    dependabot-preview[bot] synchronize #3995
  • 13:34

    dependabot-preview[bot] on nuget

    Bump BenchmarkDotNet from 0.10.… (compare)

  • 13:34
    dependabot-preview[bot] edited #3995
  • 13:34
    dependabot-preview[bot] synchronize #3993
  • 13:34

    dependabot-preview[bot] on nuget

    Bump Google.Protobuf from 3.9.1… (compare)

  • 13:34
    dependabot-preview[bot] synchronize #3991
  • 13:34

    dependabot-preview[bot] on nuget

    Bump Microsoft.Extensions.Depen… (compare)

  • 13:34
    dependabot-preview[bot] synchronize #3989
  • 13:34

    dependabot-preview[bot] on nuget

    Bump ApiApprover from 3.0.1 to … (compare)

  • 13:34
    dependabot-preview[bot] synchronize #3992
  • 13:34
    dependabot-preview[bot] edited #3993
  • 13:34
    dependabot-preview[bot] synchronize #3985
  • 13:34

    dependabot-preview[bot] on nuget

    Bump System.Reflection.Emit fro… (compare)

  • 13:34
    dependabot-preview[bot] synchronize #3986
  • 13:34

    dependabot-preview[bot] on nuget

    Bump FsCheck.Xunit from 2.9.0 t… (compare)

  • 13:34
    dependabot-preview[bot] synchronize #3983
  • 13:34

    dependabot-preview[bot] on nuget

    Bump NUnit from 3.6.1 to 3.12.0… (compare)

  • 13:34
    dependabot-preview[bot] edited #3991
  • 13:34

    dependabot-preview[bot] on nuget

    Bump ApprovalUtilities from 3.0… (compare)

Zetanova
@Zetanova
akka.cluster {
    downing-provider-class = "Akka.Cluster.SplitBrainResolver, Akka.Cluster"
    split-brain-resolver {
        active-strategy = "static-quorum"
        stable-after = 20s
        static-quorum {
            # minimum number of nodes that the cluster must have 
            quorum-size = 2
            role = "seednoderolename"
        }
    }
}
Then on a node u will need to listen on "case ClusterEvent.MemberRemoved m when m.PreviousStatus == MemberStatus.Down && m.Member.UniqueAddress == Cluster.SelfUniqueAddress:" or Register your termination action with Cluster.RegisterOnMemberRemoved(...)
If possible try to use docker, you will get your own network for all nodes and services like eventstore, mssql, elasticsearch and so on
But off course u can host them all local on your dev machine too
Vasily Kirichenko
@vasily-kirichenko
wait. You are saying that nodes are not down automatically? I need to down them myself?
what I need is just removing a disappeared node from cluster completely
ah, it works as I need!
16:54:42 INFO  [SplitBrainDecider, 24] A network partition detected - unreachable nodes: [akka.tcp://local@kirichenko-xp:3002], remaining: [akka.tcp://local@kirichenko-xp:4053, akka.tcp://local@kirichenko-xp:3001]
16:54:42 INFO  [SplitBrainDecider, 24] A network partition has been detected. KeepMajority(role: '') decided to down following nodes: [Member(address = akka.tcp://local@kirichenko-xp:3002, Uid=971885601 status = Up, role=[KldfsAuditWatcher], upNumber=2)]
16:54:42 INFO  [ClusterCoreDaemon, 7] Leader can perform its duties again
16:54:42 INFO  [ClusterCoreDaemon, 6] Leader is removing unreachable node [akka.tcp://local@kirichenko-xp:3002]
16:54:42 INFO  [ClusterSingletonManager, 6] Previous oldest removed [akka.tcp://local@kirichenko-xp:3002]
16:54:42 INFO  [ClusterSingletonManager, 6] Younger observed OldestChanged: [ -> myself]
16:54:42 INFO  [ClusterSingletonManager, 6] Singleton manager started singleton actor [akka://local/user/kldfs-audit-watcher-1-1/kldfs-audit-watcher-1]
16:54:42 INFO  [ClusterSingletonManager, 6] ClusterSingletonManager state change [Younger -> Oldest] Akka.Cluster.Tools.Singleton.YoungerData
Vasily Kirichenko
@vasily-kirichenko
thank you :)
Hovik Aghajanyan
@hovik-aghajanyan
Hi @all , is it possible to setup ApplicationInsights Monitoring via HOCON ?
Lutando Ngqakaza
@Lutando
Is there an "MemoryReadJournal" for me to to mess around akka.persistence.query without pulling up infrastructure (mongo/posgres/eventstore)
Chris Hoare
@chrisjhoare
I think there's an SQlite persistence plugin which might do the job
can run it in memory with :memory: connection string
Onur Gumus
@OnurGumus
@Horusiath ^^
then you can pass this to ConfigurationFactory.FromObject
Andre
@ondrelogin
Hello, I posted a question on stack overflow. Basically, I'm trying to unit test and actor and want to ignore a Self.Tell but assert that the Self.Tell was called. Is there a way to do that? any help is appreciated.
https://stackoverflow.com/questions/57662449/
Alex Hofer
@alexhofer
@ondrelogin you could use a TestActorRef and set some internal value on the actor when you get "2" and check it that way: https://petabridge.com/blog/how-to-unit-test-akkadotnet-actors-akka-testkit/
Andre
@ondrelogin

I'm not sure if that solves the problem. The core issue is that I don't want to process the 2nd message, I'd rather not have any special code in my actor that says, if I'm testing, then don't do this message. Ideally the code in my test class is able to handle it.

as a side note, the original more complicated test class, I am using ActorOfAsTestActorRef and it still processes the Self.Tell

Alex Hofer
@alexhofer
You could split the actor into two different behaviors then? In any case it seems like a bad idea for your code to differ in test execution and production execution.
Andre
@ondrelogin

@alexhofer i thought that you were suggesting I have "code to differ in test execution and production execution" when you said check internal value. I'm guessing you were trying to solve the issue, but perhaps you were trying to solve a separate problem.

was hoping that this was a common problem with an established solution that I couldn't find.

i just re-read what i wrote above, it could be misinterpreted as being mean, which was not my intent, so i apologize. i'll keep looking for a different solutions. thank you alex for assisting me in trying to solve my issue.
Alex Hofer
@alexhofer

Well kinda, I am not sure what this actor will do. But once you send an actor a message it should be doing everything it would normally do.

You could split your actor into two behaviors, "1" and "2", where you still send it to yourself but it stashes it. Then you could check your stash for the message. Once you are ready to change to behavior "2" then you could un-stash it. you mention in the StackOverflow post that stage 2 "will not be able to be processed and may have to be rescheduled". So splitting that into a second behavior that you control when the actor becomes would be useful anyways I think. That way you would never process that second stage message until the actor is ready. So you could have a receive handler setup something like this:

private void StepOne()
{
Receive<SomeMessage>(() => DoStuff());
Receive<ReadyForStepTwo(() => 
{
    Become(StepTwo); 
    Stash.UnstashAll();
};
ReceiveAny(() => Stash.Stash());
}

private void StepTwo()
{
//Step Two Stuff
}

Also no worries I didnt take it as mean! :)

Inside DoStuff you could tell yourself the "2";
Aaron Stannard
@Aaronontheweb
@hovik-aghajanyan it is with Phobos
Alex Michel
@amichel
@ondrelogin in you test project you can inherit from TestSelfActor and override AroundReceive method (or fake it with NSubstitute, Moq, ...),
In AroundReceive you can intercept messages and decide how to handle them (e.g. return false for "2" in your case)
Does it make sense?
Shaun van Zyl
@ShahuN-107
Hi all! I was wondering if there's an example of how to use the NewtonSoftJsonSerializerSettings class (source at https://getakka.net/api/Akka.Serialization.NewtonSoftJsonSerializerSettings.html) with akka.net. I have boolean values that default to true, but when they get deserialized after being passed over the wire they're always set to true (i.e. I cannot set them to false). The solution is to mark all properties on a serialized object with [JsonProperty(DefaultValueHandling = DefaultValueHandling.Include)], but I'd want to change this setting globally. Is this advisable, or should I rather stick to marking them all individually?
Andre
@ondrelogin
@amichel Thanks so much. That's perfect. Basically, create a test actor wrapper that inherits from my base implementation and then i can override the AroundReceive and do whatever I want. thanks gonna work great.
Vasily Kirichenko
@vasily-kirichenko
Am I right that if I have, say, 3 seed Lighthouse nodes and all the servers reboot at the same time, there are no guarantees that the cluster even forms after that?
I'm asking because the docs say that seed nodes must be launched in order they are listed in akka.hocon
Bartosz Sypytkowski
@Horusiath
@vasily-kirichenko the way how seed nodes work is very simplistic (perhaps something that should be improved):
  1. Each node pretty much goes through all seed nodes one by one and tries to connect to them.
  2. If connection fails, it takes the next seed node from the list.
  3. If connection succeeds, it starts joining protocol (which doesn't require seed nodes anymore)
  4. If the address is pointing to the current node itself, it immediately starts a new cluster with itself and doesn't look at any other of seed nodes anymore.
Lutando Ngqakaza
@Lutando
thanks @chrisjhoare I got it working with connection-string = ""Data Source=sharedmemdb;Mode=Memory;Cache=Shared""
Vasily Kirichenko
@vasily-kirichenko
@Horusiath so, if I have three Lighthouse nodes, ip1, ip2, ip3 all of them having the same seed nodes list in their akka.hocon: [ "ip1", "ip2", "ip3" ], then ip1 node must be started first, otherwise, if, for example, ip2 starts first, then ip1 will form another independent cluster. Am I right?
Bartosz Sypytkowski
@Horusiath
@vasily-kirichenko I could be wrong, but I think it works like that. I don't know what's the current akka JVM behavior, but IMHO this is something to be improved. I think that the best strategy is to have "self" as the last seed-node member and attach jittered delay (eg. randomized from 0-10 sec) before starting the actor system.
Belén
@belenmorenate
Hi all! it might be a difficult question to answer but does anybody have an idea of when the Akka.Cluster.Sharding will end its beta period?
Aaron Stannard
@Aaronontheweb
@belenmorenate at the end of Akka.NET v1.4.0
so it should be out of beta soon
Zetanova
@Zetanova
@vasily-kirichenko i tested it 1-2 weeks ago, if you have 3 seed nodes u need to change the seed order, so that the self-entry is at the end, else u will get a split instantly if the first seed node restarts. Node2-3 are UP and valid. Node1 restarts and joins itself instantly and waits for other nodes to connect "init-face".
Zetanova
@Zetanova
I am using a ClusterRouterGroup router with currently one routee. But if the routee node restarts and joins the cluster. I looks like that no message are not delivered there anymore. If a node goes down should the routee no be removed and if the node rejoins readded to the ClusterRouterGroup ?
D'Arcy Rittich
@drittich
A couple of questions around Hyperion I was unable to find answers for:
  • Why the fork from Wire, how does it differ?
  • Will it remain binary-compatible with Wire? Asking because ServiceStack uses Wire and the option of direct data exchange might be useful.
  • Does this still hold true? https://gitter.im/akkadotnet/akka.net?at=59bec683177fb9fe7ed1bf76 - I don't intent to use it for persistence, but I could see using in a gateway MQ, which would have the same issues (although probably less likely to occur).
Vasily Kirichenko
@vasily-kirichenko
@Zetanova thank you
Chris Hoare
@chrisjhoare
Wonder if anyone can help explain how the ActorBase.Context works. I'm doing some async work which will use Context.Sender to reply. Am I right in thinking if I grab the context before it will remain correct for the actor? If I do it lazily i get "There is no active ActorContext, this is most likely due to use of async operations from within this actor"
Zetanova
@Zetanova

@chrisjhoare Context is realized over thread-static fields. If you are using any value from Conext in an other thread (async or not) u will need to copy it into the state.

var sender = Context.Sender;
myTask = Task.Run(async () => {   
   sender.Tell("hallo");
});

In general u can use the IActorRef.PipeTo(...) extensions to send back a message/result on completion.

Task.Run(async() => {
   return "hello";
}).PipeTo(Context.Sender);
Bartosz Sypytkowski
@Horusiath
@drittich
  1. Back in the days Wire was converted to use GPL licensing model which is a no go for most commercial stuff. It was forked prior this point, and that's how Hyperion was made.
  2. It won't be binary-compatible. Changing the encoding is one of the major tasks to be done there.
  3. Yep. The general premise is not to use it for data to be stored/replayed for long time. Once encoding will change it will be hard to read older scheme.
Chris Hoare
@chrisjhoare
thanks @Zetanova - thats what I was hoping to be the case
Zetanova
@Zetanova
@Horusiath I have an stream that sinks to a remote actorRef. If the streams throws an error then the Exception is send to the remote actor and crashes the node (because of some serializing error in json). Is here a away to transform an exception to an custom-error-message ?
and still down the stream itself
Zetanova
@Zetanova
I am blind a bit, there is SelectError to trasnform an exception
Zetanova
@Zetanova
in Sink.ActorRefWithAck is an onFailureMessage argument but it is missing in Sink.ActorRef
Bartosz Sypytkowski
@Horusiath
@Zetanova yes, we probably should add it.