These are chat archives for akkadotnet/

Apr 2017
Aaron Stannard
Apr 15 2017 00:00
working on some more model based tests to get to the bottom of the issue
Apr 15 2017 00:03
it's odd how you are getting diffferent hash codes of the same object
the fileds used in the generation of the hash code are immutable?
Tomasz Jaskula
Apr 15 2017 09:10

Hi, I'm trying to create a child actor in F# (not using F# api but classes) and I have the following exception:

[ERROR][15/04/2017 09:07:26][Thread 0003][akka://MovieStreamingActorSystem/user/Playback/UserCoordinator/User42] Error while creating actor instance of type Actors+UserActor with 1 args: (System.Int32[])
Cause: [akka://MovieStreamingActorSystem/user/Playback/UserCoordinator/User42#197236877]: Akka.Actor.ActorInitializationException: Exception during creation ---> System.TypeLoadException: Error while creating actor instance of type Actors+UserActor with 1 args: (System.Int32[]) ---> System.MissingMethodException: Constructor on type 'Actors+UserActor' not found.
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   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__DisplayClass115_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)

Although my class is as follows:

type UserActor(userId : int) as this =
        inherit ReceiveActor()

        let userId = userId

And I try to create it like that:

let newChildActorRef = UserCoordinatorActor.Context.ActorOf(Props.Create(typeof<UserActor>, [|userId|]), "User" + userId.ToString())

Any hints?

Ismael Hamed
Apr 15 2017 10:09
@alexvaluyskiy there're still some bad references:
Unable to find a version of 'Akka.Streams.TestKit' that is compatible with 'Akka.Persistence.Sql.TestKit constraint: Akka.Streams.TestKit (>='.
Tomasz Jaskula
Apr 15 2017 11:48
Found the issue, I have to pass args without the array
let newChildActorRef = UserCoordinatorActor.Context.ActorOf(Props.Create(typeof<UserActor>, userId), "User" + userId.ToString())
Michael Tissen
Apr 15 2017 11:51
Hello, i'am using Akka.Persistence for a event-sourced application and i was wondering if one of the Akka.Persistence Plugins Support Persistence.Query?
Lev Lehn
Apr 15 2017 14:29

Regarding DI (autofac) integration. The docs say: The basic functionality is provided by a DependencyResolver class, that can create Props using the DI container. with example ending with this IDependencyResolver resolver = new XyzDependencyResolver(someContainer, system);

then there's When creating actorRefs straight off your ActorSystem instance, you can use the DI() Extension..

I don't understand that - in the example the resolver isn't used anywhere. And where does the system.DI() method know which DI container to use?

Apr 15 2017 22:13
Chris Ochs
Apr 15 2017 22:17
so a comment on the akka documention style. I see this pattern a lot. Some part of the doc will go into all sorts of detail on stuff most people don't need to know, but then fail to document the basics, the stuff you have to know. is a good example. It never actually say's where you get the actor identity from. Sender? ActorIdentity .Subject?