Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 13 22:04
    Aaronontheweb synchronize #4032
  • Nov 13 20:19
    IgorFedchenko commented #4022
  • Nov 13 20:17
    IgorFedchenko commented #4022
  • Nov 13 20:17
    IgorFedchenko synchronize #4022
  • Nov 13 20:07
    Aaronontheweb commented #4022
  • Nov 13 20:02

    Aaronontheweb on nuget

    (compare)

  • Nov 13 20:02

    Aaronontheweb on dev

    Bump Microsoft.NET.Test.Sdk fro… (compare)

  • Nov 13 20:02
    Aaronontheweb closed #4033
  • Nov 13 20:02
    Aaronontheweb commented #4032
  • Nov 13 16:38
    Aaronontheweb commented #4022
  • Nov 13 16:37
    Aaronontheweb commented #4022
  • Nov 13 16:25
    IgorFedchenko synchronize #4022
  • Nov 13 16:25
    IgorFedchenko synchronize #4032
  • Nov 13 16:08
    IgorFedchenko commented #4022
  • Nov 13 12:50
    IgorFedchenko commented #4032
  • Nov 13 06:50
    dependabot-preview[bot] labeled #4033
  • Nov 13 06:50

    dependabot-preview[bot] on nuget

    Bump Microsoft.NET.Test.Sdk fro… (compare)

  • Nov 13 06:50
    dependabot-preview[bot] opened #4033
  • Nov 12 22:40
    Horusiath commented #4022
  • Nov 12 22:03

    dependabot-preview[bot] on nuget

    (compare)

Aaron Stannard
@Aaronontheweb
@zimayel_gitlab yes, that's correct
we haven't supported that syntax in years
Ilya Komendantov
@IlyaKomendantov_twitter

Hey guys,
I have data duplication issue when using TCP. I'm sending from "for" loop on client and reply with the same message from akka (echo).
If the message size 15 bytes + 4 for length, everything is perfect (sent 20k messages that is arrived in order and no duplication).
If message size more than that, duplications arrived. The pattern here is 1,2,3,4,2,3,4,5,6,7,8,2,3,4,5,6,7,8,9,10, ... (not always)
From my investigation the issue caused by

  1. <NetworkStream>.WriteAsync(packet, 0, packet.Length).ConfigureAwait(false) on client
    or
  2. <Tcp.Received>.Data.ToArray() on server (akka)

I have a repro project and will send to anyone who volunteers for investigation :)

Alex Michel
@amichel
Hi, is there an easy way to get count of actors my actor is currently watching? FullActorState is internal class and doesn't expose _watching.Count?
joowon
@HIPERCUBE
@IlyaKomendantov_twitter Can you share the reproduce repo?
Ilya Komendantov
@IlyaKomendantov_twitter
Ilya Komendantov
@IlyaKomendantov_twitter
@HIPERCUBE I've also captured traffic it shows that client sent 10 messages and got 22 in the reply https://drive.google.com/open?id=1KYSKINzPWPoyUuK5BWHR8PeXQPg7Z-iz
remark: this is a localhost
Jan Schoeman
@oofpez
Hi! I'm looking into options for telemetry and monitoring so I can find bottlenecks.
seeing a lot of stuff for JVM Akka but not so much for AKKA.NET.
joowon
@HIPERCUBE
I really want to know that too :)
Phobos is a monitoring and tracing integration for Akka.Net build by @Aaronontheweb
the JVM has the advantage of using AOP like things to weave that stuff into your actors. .NET does not has that advantage
senzacionale
@senzacionale

I also have a problem
Message='akka.actor.provider' is not a valid type name : 'Akka.Cluster.ClusterActorRefProvider, Akka.Cluster'

my hocon config file:

akka {

stdout-loglevel = DEBUG
loglevel = DEBUG
loggers=["Akka.Logger.Serilog.SerilogLogger, Akka.Logger.Serilog"]
log-config-on-start = on  

actor {
    provider = "cluster"
}

remote {
    dot-netty.tcp {
            hostname = "127.0.0.1"
            port = 8081
            maximum-frame-size = 256000b
        }
}            

cluster {
    seed-nodes = ["akka.tcp://tradex@127.0.0.1:4053"] # address of seed node
    roles = ["ordersync", "logger"] # roles this member is in
    role.["ordersync"].min-nr-of-members = 3 # crawler role minimum node count

    # auto downing is NOT safe for production deployments.
    # you may want to use it during development, read more about it in the docs.
    #
    # auto-down-unreachable-after = 10s
}

}

Bartosz Sypytkowski
@Horusiath
@senzacionale do you have Akka.Cluster dependency in you project (it's separate nuget package). Also sometimes people are calling their project the same names, as akka packages are named, causing namespace clashes: make sure it's not your case ;)
Peter Huang
@ptjhuang
Would this be of any interest to anyone for akka.net contrib? https://doc.akka.io/docs/akka/2.5.9/actor-discovery-typed.html
Maciek Misztal
@mmisztal1980
Hey guys, can anyone tell me how many fallbacks does the config support? I've just tried to assemble my config from a parsed Config + 2 fallbacks, when the ActorSystem was created, It didn't contain all of the configs I've chained via the .WithFallback
Jorge Candeias
@JorgeCandeias
I’m not aware of limits, but on one project we have about eight fallbacks and they work fine. The one occasion where they weren’t working and I was scratching my head was because of a hard to spot typo in the hocon text.
Mike Bridge
@mikebridge
I have a WebApi app that is running in an Azure App Service and I was about to try to get it to communicate back and forth with a remote actor system running on a VM. However, I don't think I can open up a port on the App Service that the remote actor system can communicate with. If I understand correctly, attaching to a vnet will only give my WebApi app access to the things in the VNet, but not vice-versa. Do I need to move the webapp to an App Service Environment or is there a better way of accomplishing this?
Shukhrat Nekbaev
@snekbaev
heh, similar question to @mikebridge. I've been using remoting on Azure with WebApps (not ASE) since the end of September. Occasionally messages were not received back from the VM, but VM always got them. In general, WebApp restart seemed to be the way to address it. Recently it's been happening more frequently. Not sure if it has anything to do with an upgrade to 4.7.2 and/or latest Akka+dependencies. I do use VNET. When I start WebApps first and then the windows service on the VM - everything is fine. It can last for days. Basically it seems to pair webapp -> VM and keeps it like that. However, when I restart the WebApp I see "connection was reset by peer" on the VM and then when WebApp is started and the message is sent then I see the debug text in the VM's service: attempt to associate WebApp -> VM, which seems to pass, then it receives the message, processes it and tries to reply. And this fails because at this moment VM's service tries to pair back to the WebApp and I get a warning that remote is not accessible and it is gated etc. etc. What's interesting is that it doesn't happen in the happy path start-up order, but does if WebApp is restarted (at least). BTW, happy path works well in the scale-out scenario too. Is there a way to configure VM's service to not try to pair back on connection resets? :) I understand that's against the peer-to-peer nature of Akka where both endpoints should be reachable... However, ASE is not an option and given that it already works half-way... maybe there's some tweak? :) Or is this trully the case (as per docs) for a custom low-level Akka I/O approach? @Horusiath, @Aaronontheweb what do you guys think?
Mike Bridge
@mikebridge
@mikebridge In my particular case my webapp's communication with the remote actorsystem is only ever one-way. My best guess is that a better solution is to get rid of Akka.Net in WebApi and rewrite the remote actor system as a Rest API that uses Akka.Net internally. ASE looks like overkill for this system, and redeploying in a VM isn't difficult but seems like a hassle just to open a port in WebApi that isn't receiving any messages anyway. (It would be too bad, because the remote actor works great in all my internal deployment scenarios.)
Peter Huang
@ptjhuang
If we want to implement Akka.Monitoring AND establish tenant/user context AND do some authorisation checks based on message header, what's a good way to do it without multiple inheritance and traits, and with much of these infrastructural needs requiring access to lifecycle overrides of the Actor. I'm thinking of a ReceiveActor derived class (e.g. AspectReceiveActor) that provides extension points to an ordered list of "aspects" to be executed AroundXYZ. The aspect list is populated by the derived class of AspectReceiveActor in its constructor. Any other better ideas?
Shukhrat Nekbaev
@snekbaev
@mikebridge the reason I used VNET pairing - wanted all Akka traffic to be completely internal. Yes, it costs ~23 EUR, but not nearly as much as ASE :)
(and yeah, the port part too)
ryzam
@ryzam
Does anyone have experience deploy akka cluster in Azure Kubernetes Services?
Havret
@Havret
Is there any way to enrich PersistentFSM with AtLeastOnceDelivery capabilities?
Havret
@Havret
@snekbaev I believe it's because one of your services in being quarantined. Akka Remoting is not design to deal with network partitioning.
Shukhrat Nekbaev
@snekbaev
@Havret I don't see quarantine related messages in the console output, only gating for 5s and disassociation due to VM being unable to reach the WebApp. After 5 second WebApp can send another mesage and it will be received and processed, but reply will fail and this behaviour seems to remain until I restart the VM service. In this case association is created from WebApp -> VM. And VM's Akka doens't seem to require to associate back. However, if I restart the WebApp and VM's service sees it (via connection was reset by peer info log message) and try to reconnect, then it associates WebApp -> VM successfully, but at this moment VM's service Akka decides to also associate from itself back to WebApp and this fails which causes disassociation and 5s gating
Onur Gumus
@OnurGumus
@Horusiath , with akkling can we use object as the message type safely? Because doing so with persistent actor causes all messages such as ReplaySucceeded to come to actor as well. Perhaps the order should be changed for intercepting the messages.
Bartosz Sypytkowski
@Horusiath
@OnurGumus yes, you can use IActorRef<obj>, but then you'll catch any obj matching signature, including system messages sent to an actor. There's no easy way to just filter them out. Once I'll be done with porting akka-typed, then this will be much easier and consistent to do.
Zetanova
@Zetanova
hi, Why does the IPersistenceIdsQuery.PersistenceIds() not provide any filtering or offset logic? I cant find any other method to resume a query, beside the method with the EventsByTag + Offset. Is the regular why realy to save every LastSeqNr for each PeristenceId in a projection?
Bartosz Sypytkowski
@Horusiath
@Zetanova if I remember correctly PeristenceIds only give you the list of PIDs known up until "now". If you're intersted with continuous stream of all new incoming PIDs, you can use AllPersistenceIds method.
Onur Gumus
@OnurGumus
@Horusiath once I get the system messages, how can I return it back to system to be processed?
then first the message will be checked against system and if not object type will pick it up
ah of course then you can't access to the events even if you want to
Zetanova
@Zetanova
@Horusiath Thx, for the advice, ther is a CurrentPersistenceIds and PersistenceIds method. But what i am interested in is to resume a stream (process restart) without the help of EventsByTag. If there are a lot of PID's (>100k) the readJournal.PersistenceIds is getting useless. What should a process do with the PId's without any metadata like timestamp, ordering-id? It can only load each individual stream on every process restart. That makes the method readJournal.PersistenceIds for larger event stores not very unperformant.
AndreSteenbergen
@AndreSteenbergen
I have a question regarding the webcrawler example, when you have multiple apimasters and you set the routing algorithm to "router = consistent-hashing-group", would I really need to do a broadcast requesting if some other apimaster is already crawling that domain? Could I just simply check "Does this actor already have a crawler for domain XYZ"? The broadcast only really makes sense when it is round-robin instead of hashing? Or am I missing the point?
Chris G. Stevens
@cgstevens

I am trying to test an actor that is using PubSub; _mediator = DistributedPubSub.Get(Context.System).Mediator.
But when I run my test I get a "System.NullReferenceException: 'Object reference not set to an instance of an object.'"
The DistributedPubSub doesn't seem to get initialized and not sure how or what I need to to do.
The website, https://getakka.net/articles/actors/testing-actor-systems.html#configuration, has a todo on it: TODO describe how to pass custom config as I figure I need the config.

Within the [Setup] of the test I tried adding the following with no luck.
Sys.Settings.Config.WithFallback(Akka.Cluster.Tools.PublishSubscribe.DistributedPubSub.DefaultConfig());

I doesn't even want to test the actual PubSub part... Are there any examples on this?

Havret
@Havret
@cgstevens You can inject Mediator inside you actor and test it like any other IActorRef dependancy.
Peter Huang
@ptjhuang
@cgstevens the problem might be that the test actor system is already initialised for you by testkit. You might want to create your own actorsystem setup with PubSub and that for testing. (Furthermore, you'll find Sys.Settings.Config.WithFallback(Akka.Cluster.Tools.PublishSubscribe.DistributedPubSub.DefaultConfig()) will just give you back a new instance of a Config and not do anything with it - it's an immutable object)
Peter Huang
@ptjhuang
@AndreSteenbergen Suppose you have 2 web servers A and B, 1 api master X, and 1 more api master Y just joined. Server A picked up the new API master, but Server B has yet to learn of the new API master. Request 1 comes in via web server A, gets routed to API master Y. Request 2 comes in via web server B, gets routed to X. X might start working on the same URL too. Could that be the reason? I'm interested to know from the experts. In cases where correct message destination is important, e.g. a multitenancy design where we want an actor sub-tree per tenant, does consistent hashing group guarantee the message ends up at the right actor save spawning a second tree for the tenant?
Mike Bridge
@mikebridge
@snekbaev I ended up sending the events through to the actorsystem from WebApi via an Azure EventHub. This simplifies things quite a bit---no need for a remote actor system or a cluster or anything.
Shukhrat Nekbaev
@snekbaev
@mikebridge I'm still waiting for @Horusiath or @Aaronontheweb to reply. Meanwhile made a small PoC with akka io. It feels like it is partially replicating how remoting works. Basically, client keeps on retrying to connect to the target VM's service every 5s. When connection is established, WebApi sends messages to local actor, which internally wraps into another message, adds correlation id and stores correlation id <-> Sender mapping in the dictionary, because I need to receive a reply from VM's service. Then via json.net serialize the object and send. Receiving end deserializes it and sends to the proper actor, after processing it replies back (with correlation id) to the connection handler actor which in turn serializes back and sends to the WebApi. On WebAPI's site corresponding recepient is selected from the dictionary and message is send to it. All in all, it seems like calling code from WebAPI can still be doing the .Ask and that complexity is hidden from it. Of course I wish there was a switch to the remoting, because it's way to much boilterplate now. Also, probably, not so great custom tcp connection establish/retry related logic, plus routing and custom correlations... http would have been simpler. Maybe will rework this one day when migrate to .net core. For now just made an unvalidated assumption that TCP will be faster, given that this specific logic can be quite bursty.
Mike Bridge
@mikebridge
@snekbaev I've managed to keep this simple by keeping state outside webapi and pushing client messages out via pusher, so it's kept the networking architecture pretty straightforward. Not sure if this is the best way to do it but putting Akka.Net in the middle to manage some weird state with nothing but event input doesn't feel too cumbersome.
Shukhrat Nekbaev
@snekbaev
@mikebridge absolutely, if that works best for your scenario, definitely. I needed a reply for the .Ask call initiated from the WebApi's side. Also I thought that using the same approach I could have a pub/sub for certain potential future scenarios without using/adding any other technologies, but that's open to R'n'D tbh.
Dan Albrecht
@Dan-Albrecht
Anyone have an example of code doing config substitution? I just have markers in the config file right now and doing a find/replace before passing it to ConfigurationFactory.ParseString...gotta be doing it wrong.