Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 21 16:16
    dependabot[bot] labeled #5285
  • Sep 21 16:16
    dependabot[bot] opened #5285
  • Sep 21 16:16

    dependabot[bot] on nuget

    Bump Fsharp.Core from 5.0.2 to … (compare)

  • Sep 20 18:36
    Zetanova commented #5230
  • Sep 20 18:18
    Zetanova commented #5230
  • Sep 20 16:06
    to11mtm commented #5230
  • Sep 20 15:24
    Aaronontheweb commented #5230
  • Sep 20 14:15
    to11mtm commented #5230
  • Sep 20 13:56
    tcs-devel commented #3261
  • Sep 18 08:45
    Zetanova commented #5152
  • Sep 18 07:37
    Zetanova synchronize #5152
  • Sep 18 07:15
    Zetanova commented #5273
  • Sep 18 05:12
    Zetanova synchronize #5273
  • Sep 18 04:51
    Zetanova synchronize #5273
  • Sep 17 16:56
    Aaronontheweb commented #5273
  • Sep 17 08:49
    Zetanova review_requested #5273
  • Sep 17 03:30
    Zetanova synchronize #5273
  • Sep 17 02:41
    Zetanova commented #5273
  • Sep 17 00:44
    Arkatufus closed #5284
  • Sep 16 21:14
    Arkatufus opened #5284
nathvi
@nathvi
Here's my final test that works as expected
[Fact]
        public void RequestUpdateStateSentMultipleTimes_OnlyOneResponseBack()
        {
            var probe = CreateTestProbe();
            IActorRef putwallActor = Sys.ActorOf(PutwallActor.Props());
            var guidId = Guid.NewGuid();
            putwallActor.Tell(new PutwallActor.CubbyMessage.RequestUpdateState(true, guidId), probe.Ref);
            var cubbyStateResponse = probe.ExpectMsg<PutwallActor.CubbyMessage.RequestUpdateState.Response>();
            Assert.Equal(guidId, cubbyStateResponse.MessageId);

            for (int i = 0; i < 200; i++)
            {
                putwallActor.Tell(new PutwallActor.CubbyMessage.RequestUpdateState(true, guidId), probe.Ref);
                probe.ExpectNoMsg(TimeSpan.FromMilliseconds(1));
            }
        }
Stijn Herreman
@stijnherreman
I'd put the ExpectNoMsg outside of the loop with a longer timeout, and personally (in my own tests) I just send a second message instead of hundreds, to verify that it only responds to the first message. But other than that your code seems fine.
nathvi
@nathvi
Why the longer timeout?
nathvi
@nathvi
@stijnherreman
C. Augusto Proiete
@augustoproiete

Hello everyone. Looking for some pointers on the right way to do the following with Akka:

Actor A needs to send a message to Actor B, however, they can’t see each other, and the only communication channel between these two actors is an Azure Blobstore that they both can read/write.

Should I be looking at implementing a custom mailbox? Custom transport? Or something else? Any recommendations welcome.

Aaron Stannard
@Aaronontheweb
@caioproiete .... why is the azure blob store the only thing they can use to communicate with each other?
and these actors are running on different processes I take it?
C. Augusto Proiete
@augustoproiete
@Aaronontheweb These are remote actors that run in completely separate networks and they cannot see each other due to firewalls, etc. But they can go to a specific place (e.g. Blobstore) where they can both read/write and exchange messages
I could easily serialize my some messages and make it work, but I’d prefer to use the Akka infrastructure
C. Augusto Proiete
@augustoproiete
For example, what is the recommended way to use RabbitMQ, ZeroMQ, etc. with Akka, so that it becomes the channel where Akka messages go through?
I basically want that, but replacing the channel with something else that will take care of persisting the message to/from Azure Blobstore (or whatever the shared place is)
Stijn Herreman
@stijnherreman
@nathvi because your actor could still be busy, 1ms isn't that long. 1 second gives you better assurance that the actor doesn't send out a message.
Paul Trandem
@ptrandem
Does anyone know if there's a way to get the CurrentMessage in PostStop() ?
Aaron Stannard
@Aaronontheweb
@ptrandem technically there isn't a CurrentMessage in that state since it occurs after the actor has begun terminating
it'd be the system message that triggers the actor to run its PostStop sequence
that would be the current message there
are you trying to get access to whatever is inside the mailbox?
for recovery / replay purposes?
Paul Trandem
@ptrandem
I'm trying to put together a pattern that responds with the original problem message after a certain # of supervisor-initiated restarts.
I'd like to respond to the parent with the original sender and message
Aaron Stannard
@Aaronontheweb
ah, I see
Paul Trandem
@ptrandem
once the superviser has issued a stop
Aaron Stannard
@Aaronontheweb
let me look real quick
might be a method on the ActorCell
Paul Trandem
@ptrandem
In debugging in my little test, I have a breakpoint in PostStop() and the CurrentMessage on Context is a reference to my own TestMessage, so that's why I assumed that's what I'd need.
so this is a little hacky IMHO
but
if your actor throws
and gets stopped
CurrentMessage is still the original message that caused the throw
because CurrentMessage = null never gets to run
exception disrupted it
so looks like it should still be preserved
if you just use that property
Paul Trandem
@ptrandem
Using that property would be great, but it's not exposed via IActorContext; i can only see it in the debugger.
I'll take a look at ActorCell as well.
Aaron Stannard
@Aaronontheweb
if you do IActorContext.AsInstanceOf<ActorCell>
that would do it\
it's assignable to that type
like I said, hacky
but it should work
Paul Trandem
@ptrandem
aah! ok. Hacky, yes, but we'll give that a shot. Thanks @Aaronontheweb !
Arsene Tochemey Gandote
@Tochemey
Hello I am having challenges create actors with Netcore where the actors need an injection of a repository at startup.
At any time I got System.ObjectDisposedException in the actor when accessing the repository interface
Bartosz Sypytkowski
@Horusiath
@Tochemey how and when are you creating your actors? Example: If you create an actor in some managed other context (i.e. http request handler) using that context's lifecycle to inject repository, it's quite probable that this repository will be disposed, while actor still lives - as actor context may live longer that context of http request.
Arsene Tochemey Gandote
@Tochemey
Ok
Arsene Tochemey Gandote
@Tochemey
@Horusiath Please is there a way to create actors with DI where the actors has constructors params?
Hyungho Ko
@hhko
My app got this log.