These are chat archives for akkadotnet/akka.net

6th
Nov 2015
Bartosz Sypytkowski
@Horusiath
Nov 06 2015 08:28
@melcloud there's nothing bad in that, as long as you handle message confirmations in the new behavior
Yin Zhang
@melcloud
Nov 06 2015 09:32
@Horusiath Thanks for that. Can you show me an example how to do Become in AtLeastonceDelivery? It doesn't seem to accept private void method. Cheers
Bartosz Sypytkowski
@Horusiath
Nov 06 2015 09:46
@melcloud probably it works on canonical Receive signature which is bool Receive(object msg)
where returned flag should be true if message was considered handled.
Yin Zhang
@melcloud
Nov 06 2015 09:50
Ah, of course. Silly me. Thanks... been a long day...
Bartosz Sypytkowski
@Horusiath
Nov 06 2015 09:50
np ;)
Pawel Kasperek
@silentnull
Nov 06 2015 10:04
Hi, as F# developer I used Mailbox Actor system. Last time I'm looking to Akka. Maybe my question is stuppid, but I can used all Akka.NET features in F# ?
Bartosz Sypytkowski
@Horusiath
Nov 06 2015 10:06
@silentnull yes, but in general F# API is more specific - closer to FP, and not all plugins are adjusted to this paradigm.
sometimes some wrapper over OO might be needed
Pawel Kasperek
@silentnull
Nov 06 2015 11:12
@Horusiath Thank you for answer, that I'm starting learning Akka in F# :) . Maybe I will convert some plugins to F#, because sometimes is difficault use OO in FP.
Zetanova
@Zetanova
Nov 06 2015 11:27
Yes, debugging is a horror in akka.net
Arjen Smits
@Danthar
Nov 06 2015 11:29
Hallmark of async applications
Although with Akka its alot easier to test and debug your Actors in isolation.
John Nicholas
@MrTortoise
Nov 06 2015 11:36
is there a way to get a timestamp on logging by default?
Roger Johansson
@rogeralsing
Nov 06 2015 11:58
@MrTortoise There is a timestamp on logging already, is there something specific you mean?
Hussein Ait-Lahcen
@hussein-aitlahcen
Nov 06 2015 13:12
@Horusiath Is there a way to ensure that a specified actor get executed in the same thread update after update ?
John Nicholas
@MrTortoise
Nov 06 2015 13:16
@rogeralsing there is sorry, i meant much higher resolution ... seconds is a bit course grained.
Bartosz Sypytkowski
@Horusiath
Nov 06 2015 13:18
@hussein-aitlahcen depending on your needs, you may define actor props with non-default dispatchers. Pinned one will give your actor while separate thread, synchornized one will use UI thread to execute you actor. Alternativelly you could use fork-join dispatcher two define separate thread pool for an actor (which could consist of 1 thread too)
John Nicholas
@MrTortoise
Nov 06 2015 13:18
@hussein-aitlahcen http://getakka.net/docs/Dispatchers ... also here has an example of what you asked for https://github.com/petabridge/akka-bootcamp/tree/master/src/Unit-2
Jared Lobberecht
@Jared314
Nov 06 2015 13:20
is there a way to have multiple hocon sections in the web.config with inheritance?
Roger Johansson
@rogeralsing
Nov 06 2015 13:20
@MrTortoise ah, yes, I have a PR for that to support this akkadotnet/akka.net#1367
I need to add some tests for it to be merged first
but that will allow you to change how the logging templates are presented
John Nicholas
@MrTortoise
Nov 06 2015 13:29
oh cool thats what i want ;) thanks ill keep an eye on that then, thats cleaner than what i'm doing
Hussein Ait-Lahcen
@hussein-aitlahcen
Nov 06 2015 13:33
@Horusiath Thanks, the fork join dispatcher seems to fit
Diego Frata
@diegofrata
Nov 06 2015 16:00

I'm creating a ReceivePersistentActor using Context.DI().Props<T>() and I'm getting this exception:
```
Exception thrown: 'System.NotSupportedException' in Akka.dll

Additional information: DequeBasedMailbox required, got: UnboundedMailbox

An (unbounded) deque-based mailbox can be configured as follows:

my-custom-mailbox {

    mailbox-type = "Akka.Dispatch.UnboundedDequeBasedMailbox"

}
I shouldn't need to specify my own Mailbox type, right? It seems like a bug to me.
Diego Frata
@diegofrata
Nov 06 2015 16:21
My actors implement a common interface and I was using the interface as T instead of the concrete type. It was messing the ActorCell creation. I wouldn't say this is a bug, but it's definitely a point for improvement IMHO. In the meantime I'm passing concrete types.
Thomas Tomanek
@thomastomanek
Nov 06 2015 17:21
hmm, there was a bug ages ago that returned a similar/same exception when using autofac to create actors
#941
Christian Duhard
@cduhard
Nov 06 2015 22:03
Christian Duhard
@cduhard
Nov 06 2015 22:14

what might these messages mean?

[Debug] Resolve of path sequence [/"user/contact-pool-e4338572-5484-4e67-94d5-59e7289d207e/$b"] failed

Aaron Stannard
@Aaronontheweb
Nov 06 2015 22:14
@cduhard what were you trying to do?
Christian Duhard
@cduhard
Nov 06 2015 22:15
not sure when that log message is getting fired, but I have a small RR pool per Parent that gets handed to it's children
Aaron Stannard
@Aaronontheweb
Nov 06 2015 22:16
that message occurs when an actor selection fails
the requested path could not be found
Christian Duhard
@cduhard
Nov 06 2015 22:18
                Context.System.ActorOf(
                    Akka.Actor.Props.Create<ContactVerificationActor>(ContactService.GetInstance(),
                        new SequenceService())
                        .WithRouter(new RoundRobinPool(2))
                    , "contact-pool-{0}".FormatWith(Guid.NewGuid()));
why would selection fail? i have never seen that message before today
Aaron Stannard
@Aaronontheweb
Nov 06 2015 22:22
my bad - here's where it gets called
private IActorRef ResolveActorRef(IInternalActorRef actorRef, IReadOnlyCollection<string> pathElements)
        {
            if(pathElements.Count == 0)
            {
                _log.Debug("Resolve of empty path sequence fails (per definition)");
                return _deadLetters;
            }
            var child = actorRef.GetChild(pathElements);
            if(child.IsNobody())
            {
                _log.Debug("Resolve of path sequence [/{0}] failed", ActorPath.FormatPathElements(pathElements));
                return new EmptyLocalActorRef(_system.Provider, actorRef.Path / pathElements, _eventStream);
            }
            return child;
        }
Inside LocalActorRefProvider
Christian Duhard
@cduhard
Nov 06 2015 22:22
the messages eventually stop and everything seems to move along fine
Aaron Stannard
@Aaronontheweb
Nov 06 2015 22:23
without seeing what's actually happening, i.e. the larger context
difficult to tell
never seen that error get logged before
Context.System.ActorOf is weird though - you're not creating a child when you do that
you're creating another top-level actor
not sure if that's intentional or not
Christian Duhard
@cduhard
Nov 06 2015 22:24
shit, no it's not
hah, thanks for noticing that, dunno if it's related to my issue
Aaron Stannard
@Aaronontheweb
Nov 06 2015 22:28
yeah me neither
could you post a bigger gist?
Christian Duhard
@cduhard
Nov 06 2015 22:30
the weird thing is i have another pool created the exact same way that doesn't throw those errors
Christian Duhard
@cduhard
Nov 06 2015 22:35
the only thing i've changed is i went from a ReceiveActor to ActorBase, it's likely something i missed there
Christian Duhard
@cduhard
Nov 06 2015 22:42
i don't know what i'd put in the gist, what would help?
is there a problem with using PatternMatch in Receive?
Bartosz Sypytkowski
@Horusiath
Nov 06 2015 23:06
@rogeralsing I've pushed #1408 for initial Akka.Cluster.Tools, but when working on example program, I've found two serialization issuess: 1) is concerning JSON.NET not being able to deserialize IDictionary<Address, ...> (if get serialized as map of string keys) and 2) is about Wire having problems with finding default constructor for System.Collections.Immutable.ImmutableDictionary
any of them is effectively blocking distributed pub/sub (and cluster client) examples to work
Christian Duhard
@cduhard
Nov 06 2015 23:10
I am getting all these:
[Debug] Resolve of path sequence [/"user/contact-pool-e4338572-5484-4e67-94d5-59e7289d207e/$b"] failed
before the router even receives any messages.
Aaron Stannard
@Aaronontheweb
Nov 06 2015 23:19
hmmm... mind creating an issue for that @cduhard ?
I wonder if there's something racy with the way routers create children
might be totally harmless
but we should investigate
Christian Duhard
@cduhard
Nov 06 2015 23:20
could it have anything to do with monitoring?
Aaron Stannard
@Aaronontheweb
Nov 06 2015 23:20
using Akka.Monitoring?
Christian Duhard
@cduhard
Nov 06 2015 23:20
yes
Aaron Stannard
@Aaronontheweb
Nov 06 2015 23:21
hmmm.... could be - calling it from the child actor/
?
Christian Duhard
@cduhard
Nov 06 2015 23:21
yes
Aaron Stannard
@Aaronontheweb
Nov 06 2015 23:21
only way I could see that happening would be if the actor was receiving a message while it was still being created... which Akka.Monitoring implementation are you using?
Christian Duhard
@cduhard
Nov 06 2015 23:22
statsd
nothing gets to Receive until after i see a zillion of those messages
Aaron Stannard
@Aaronontheweb
Nov 06 2015 23:23
could you do a test for me and try commenting the monitoring method calls out
see if those come in?
because I have literally never seen this message in two years of using Akka.NET
Christian Duhard
@cduhard
Nov 06 2015 23:23
yeah i'm about to do that
yeah, they still show up
Aaron Stannard
@Aaronontheweb
Nov 06 2015 23:25
post a gist with the full source for this
can't give you any meaningful help with just what's in gitter
Christian Duhard
@cduhard
Nov 06 2015 23:26
i understand
Aaron Stannard
@Aaronontheweb
Nov 06 2015 23:26
basically it's a race condition of some sort - someone's trying to resolve a reference to a child actor that doesn't exist yet
the interesting question is how that's even possible - these should all be self-contained
my gut tells me that the way you've exposed these actors inside your application contains shared mutable state
but without seeing that
I'm just guessing
if these are just child actors to some other actor then 100% of that state is private and self-contained
Christian Duhard
@cduhard
Nov 06 2015 23:28
the actors that use this router are PersistenActors
the router is shared amongst persistent actors created by a parent coordinator
none of this was happening until i converted the routed actors from ReceiveActor to ActorBase
return Akka.Actor.Props.Create(() => new Account(id, OtherRouter, ContactVerifier));
like that
thats how the router gets used, it only receives messages from siblings
Aaron Stannard
@Aaronontheweb
Nov 06 2015 23:33
so the child actors inherit directly from ActorBase?
why that instead of ReceiveActor?
Christian Duhard
@cduhard
Nov 06 2015 23:33
yes
I'll try changing it back and see if that's the cause here. it's weird that the other router doesn't do this
Christian Duhard
@cduhard
Nov 06 2015 23:43
same problem
ok, it seems to be happing everytime UpdateState gets called in the persistent actor
Christian Duhard
@cduhard
Nov 06 2015 23:53
if i log there these messages are interleaved
its definitely related to the journal replay. why/how no clue...
Christian Duhard
@cduhard
Nov 06 2015 23:58
there is nothing related to those routers happing in UpdateState