These are chat archives for akkadotnet/akka.net

3rd
Aug 2016
Roger Johansson
@rogeralsing
Aug 03 2016 06:52
@alexvaluyskiy totally agree with that, I've even put it in the readme for Wire. that Persistence and MessageQueues should use protobuf or MS Bond
I am however also thinking about adding stronger schema support to wire too. with attributes, to make it able to handle versioning the same way as protobuf and bond
Vagif Abilov
@object
Aug 03 2016 09:06
@wyldebill For actors representing persistent domain entities you should come with IDs that uniquely identify these actors and don't change over time, i.e. using GUIDs is probably a bad idea. It's impossible to come with a concrete suggestion without knowing your domain.
Martin Helmer
@helmerm
Aug 03 2016 09:26
@bobanco you have to downgrade to wire version 0.0.6
Arsene Tochemey GANDOTE
@Tochemey
Aug 03 2016 10:36
What is the best way to implement Supervisory mode at the ActorSystem level assuming I want to escalate an issue?
Arsene Tochemey GANDOTE
@Tochemey
Aug 03 2016 10:57
What is the best way to implement Supervisory mode at the ActorSystem level assuming I want to escalate an issue? Any help on this?
Arjen Smits
@Danthar
Aug 03 2016 10:59
Use supervision strategy's ?
depending on your needs, let your worker actor crash, and have the exception be handled by its parent using a supervision strategy
then the parent can decide to escalate the issue to its parent, or send a message to an actor. Whatever you want.
Arsene Tochemey GANDOTE
@Tochemey
Aug 03 2016 11:00
@Danthar What I want is to stop the actor system when a particular error occur. For instance reading config file that does not exist.
rsinohara
@rsinohara
Aug 03 2016 11:31
Hey everyone. I understand the test actor is synchronous, right? So after telling it a message, I don't need to wait before checking underlying state, correct?
@Tochemey You are talking about catching actorsystem level errors ?
rsinohara
@rsinohara
Aug 03 2016 11:34
Thanks @Danthar, I got a few AwaitAsserts to remove :)
Arsene Tochemey GANDOTE
@Tochemey
Aug 03 2016 11:35
@Danthar Yes
rsinohara
@rsinohara
Aug 03 2016 11:37
Now for a deeper question: I am using akka.net on an ASP MVC project. MOST of what I do works by sending a message inside the actor system, then the actors will communicate with the browser through SignalR. Now there are some cases where I would like to pull data from actors from my controllers... what is the best way to do that? I'm at a loss on how to achieve this.
Arjen Smits
@Danthar
Aug 03 2016 11:42
@Tochemey There is no user-facing api to catch actorsystem level errors. And generally you should not have to do that. If you think there are scenario's that could use more/better error reporting, please create an issue on github.
@rsinohara the Ask<> pattern is used for that.
rsinohara
@rsinohara
Aug 03 2016 11:44
@Danthar Great, I wasn't sure that was the right way.

This is weird. I am testing that an actor responds well if an existing user is added to a dictionary. I just created the test so it should fail (actually, it will throw since the key in the dictionary already exists.

           _testActor.Tell(new QueueActor.NewUserInQueue(_clientData));
            _testActor.Tell(new QueueActor.NewUserInQueue(_clientData));

            Assert.AreEqual(1, _testActor.UnderlyingActor.UserQueue.Count);

Now, besides the fact of my assertion being bad, this does throw when debugging. But it passes when the test is just run. How can I make this test fail?

rsinohara
@rsinohara
Aug 03 2016 11:49
This message was deleted
Arjen Smits
@Danthar
Aug 03 2016 11:50
Depending on the supervisionstrategy that your actor uses. It will simply restart. Which is normal actor behavior.
So your exception is thrown, the default supervisionstrategy catches it, restarts your actor, and off you go
rsinohara
@rsinohara
Aug 03 2016 11:51
But the dictionary is still populated with the first user. Shouldn't restart clear it? It is newed up on the actor's constructor.
Arjen Smits
@Danthar
Aug 03 2016 11:54
you could create the actor you want to test, with an supervision strategy that stops the actor if an exception occurs
then you can use Watch() to watch the actor your testing, send the messages you need to send, and then verify the actor was terminated.
that would effectively test that it throws an exception upon receiving your 2th message
I think there is an example in the petabridge link i posted just now
rsinohara
@rsinohara
Aug 03 2016 12:03
I'll try that... but I don't get why the internal state was kept.
Daniel Söderberg
@raskolnikoov
Aug 03 2016 12:18
Anyone knows why akka cluster with lighthouse spits out a ton of error messages when an actor is disconnected/crashed ?
Kris Schepers
@schepersk
Aug 03 2016 12:21
Anyone an idea about the cause of a massive amount of errors like these?
2016-08-03 14:18:17.9634|ERROR|ARClass|Persistence failure when replaying events for persistenceId [ARClass@80bd0d47-eb9f-4a61-9671-64cc71fe3074]. Last known sequence number [0]|Akka.Pattern.OpenCircuitException: Circuit Breaker is open; calls are failing fast
at Akka.Pattern.Open.InvokeT
at Akka.Pattern.CircuitBreaker.<WithCircuitBreaker>d__32`1.MoveNext()
Too many concurrent write/reads from event journal?
Arsene Tochemey GANDOTE
@Tochemey
Aug 03 2016 12:27
Hello is there a way to get the ActorRef in the supervisory strategy
rsinohara
@rsinohara
Aug 03 2016 12:28
Following http://getakka.net/docs/Supervision, I can't set the decision strategy for an UntypedActor....
protected override SupervisorStrategy SupervisorStrategy()
        {
            return new OneForOneStrategy(// or AllForOneStrategy
                maxNrOfRetries: 10,
                withinTimeMilliseconds:30,
                decider: x =>
                {
                return Directive.Stop;

                });
        }
It says cannot convert lambda Expression to IDecider because it's not a delegated type.
Also I noticed the argument names are different from the link I posted, and I cannot find doc on the prototype I have.
rsinohara
@rsinohara
Aug 03 2016 12:35
Oh, got it here, with Decider.From(...), http://getakka.net/docs/concepts/supervision
Vagif Abilov
@object
Aug 03 2016 13:04
Hmm, is the only way to make newest Wire work is to use Akka from sources? I am getting the following exception:
Method not found: 'Void Wire.SerializerOptions..ctor
Vagif Abilov
@object
Aug 03 2016 13:40
Oh I see just downgrading Wire to 0.6 should resolve it.
Peter Bergman
@peter-bannerflow
Aug 03 2016 13:47

Anyone seen this exception while recovering state with Akka.Persistence from Redis?

 Worker.Actors.ParseActor: Persistence failure when replaying events for persistenceId [job49]. Last known sequence number [0] StackExchange.Redis.RedisServerException: ERR value is out of range
      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Akka.Persistence.Redis.Journal.RedisJournal.<ReplayMessagesAsync>d__5.MoveNext()

In the journal, I only have one event to reply

Arsene Tochemey GANDOTE
@Tochemey
Aug 03 2016 13:53
Is there a way to check from the actorSystem the state of an actor (dead or live)?
Marc Piechura
@marcpiechura
Aug 03 2016 13:55
I'm not 100% sure but I think you could send him a Identity message, if it's alive it will response with an IActorRef otherwise it returns Nobody
ollivogel
@ollivogel
Aug 03 2016 14:35
Assume a message has been sent to a pool. The pool routes this message to an actor by some strategy. Now the actor processes the message and sends another message to "Self". Will this message being sent to the pool or to the same actor's mailbox?
Arjen Smits
@Danthar
Aug 03 2016 14:46
@ollivogel the same actor.
Arsene Tochemey GANDOTE
@Tochemey
Aug 03 2016 14:57
This message was deleted