These are chat archives for akkadotnet/akka.net

14th
Jun 2017
Robin Cox
@RobinJDCox
Jun 14 2017 08:18
@Horusiath @object Regarding my question yesterday about the Circuit Breaker opening we managed to figure out how to get the errors to log properly. We were having some confusion between 'WriteMessageFailure' message and the 'WriteMessagesFailed' message. We're now handling the correct one and have the information we need
We noticed there's a few instances of this where there's a singular and a plural of effectively the same message. It's not immediately obvious that you'll need to handle both - perhaps something that could be simplified or at least better documented?
Thanks for your help
Jean-Christophe Lagache
@jclagache
Jun 14 2017 12:02
Hello. Can I create a top level actor with a specific supervision strategy ?
Arjen Smits
@Danthar
Jun 14 2017 12:05
@jclagache yes, you can specify the supervision strategy as part of the ActorOf call.
Jean-Christophe Lagache
@jclagache
Jun 14 2017 13:02
thx @Danthar. ok, something like that : ActorSystemRefs.AuthorizationFacadeActor = actorSystem.ActorOf(Props.Create(() => new RemoteLookupProxyActor(path), SupervisorStrategy.StoppingStrategy), "RemoteLookupProxyActor");
chipdice
@chipdice
Jun 14 2017 13:43
If I use Distributed PubSub with GroupIds, how do I publish to a specific groupId? I have a number of topics, but want each of my services to be able to publish to a topic with a specific GroupId representing the service. Is this the way to go about this?
Bartosz Sypytkowski
@Horusiath
Jun 14 2017 14:51
@mithril52 basic config expects a list of addresses pointing to cluster receptioninsts on cluster nodes, something like seed nodes, but the difference is that cluster client won't try to join the cluster, instead talking with one of the receptioninsts directly
@RobinJDCox this plural naming comes from the fact, that you can order to persist multiple events at once. Some notifications are then called per every event in batch, while others may be called just once per whole group
@chipdice I guess this blog post part could help you
chipdice
@chipdice
Jun 14 2017 15:15
@Horusiath This is what I have been woking from. I guess I don't know how to use groupIds properly or I am not using the correct publishing mode. Publish doesn't seem to have an option to broadcast to all members of a specific group. I see broadcast but not a groupId parameter to Publish
Bartosz Sypytkowski
@Horusiath
Jun 14 2017 15:24
@chipdice have you tried to set akka.cluster.pub-sub.routing-logic = broadcast?
by default groups are not used for broadcasting, this is what topics are for
chipdice
@chipdice
Jun 14 2017 15:25
@Horusiath Yes, and it works, however if I have differents groups, I want to target a specific group with a broadcst
Bartosz Sypytkowski
@Horusiath
Jun 14 2017 16:03
@chipdice
  1. What holds you from building dedicated topics instead of trying to broadcast to group? Topic/group distinction is just akka distributed pub/sub construct, it may not match 1-1 to your domain.
  2. Maybe you could use broadcast group router instead of group?
David Rivera
@mithril52
Jun 14 2017 16:05
@Horusiath Thank you very much for the help. I found a little bit of the configuration information in one of the example projects in github. With that, and a little experimentation, I was able to get a receptionist up and running and successfully connect to it and pass messages to the cluster from the client. So thats great. I do have one question though. Is there anyway to pass messages to the client from the cluster without a request coming from the client? It doesn't like like it from what I can see, but wanted to ask just in case. We can just periodically send poll requests from the client, obviously, but wanted to make sure there wasn't a more efficient way of doing it first.
Bartosz Sypytkowski
@Horusiath
Jun 14 2017 16:20
@mithril52 you can always call any actor by using it's actor path (this version with ip address + port) as long as akka.actor.provider is either cluster or remote and the network connection between those 2 endpoints is open
David Rivera
@mithril52
Jun 14 2017 16:21
@Horusiath Hmm, even though the actor systems are different?
chipdice
@chipdice
Jun 14 2017 16:22
@Horusiath I have fallen back to doing exactly that. I was looking into trying this by groupId instead of having a ton of different topics, however not using GroupId is very doable at this point. Thanks for your input
Graham Ambrose
@gambrose
Jun 14 2017 16:27
Using Akka Streams is there something akin to SelectMany that would also allow sending some messages when the source completes?
I’m trying to write a Flow what de-bounces incoming messages, which I can almost do using select many, but I need a way to flush the pending state to the sink then the source completes.
I’m struggling with this as it’s my first time using Akka Streams and I’m still learning the API.
David Rivera
@mithril52
Jun 14 2017 16:29
@Horusiath Wow, that does work! Thank you, thats exactly what I needed
Bartosz Sypytkowski
@Horusiath
Jun 14 2017 18:09
@gambrose debounce like shown in rxmarbles? That sounds like custom GraphStage, something that would expose you to the internal magic of akka.streams. It may be hard at the beginning, but ultimately you could do incredible things with it.
Graham Ambrose
@gambrose
Jun 14 2017 20:07
@Horusiath thanks I will have a look at creating a custom GraphStage. I was trying to implement it as reactive streams processor but was finding it hard going. It apears you have to implement the reactive stream interfaces from scratch and was struggling to find good examples. I manged to wrap azure eventhub as a reactive publisher to use as a Source but the IProducer interface is a whole other level of keeping track of what is supposed to call what in what order.
Bartosz Sypytkowski
@Horusiath
Jun 14 2017 20:50
@gambrose in 9/10 cases you don't ever want try to implement IPublisher/ISubscriber/IProcessor interfaces - they are interfaces defined as SPI (Service Provider Interface), this means that they are used as means of communication between libraries implementing reactive streams specification, but usually should not be exposed to be implemented by library users.
@Silv3rcircl3 I'm not sure, but we may not have debounce operator in akka streams. Also I don't see TimerStageLogic present in docs, but it should be probably used in this context.
Bartosz Sypytkowski
@Horusiath
Jun 14 2017 20:57
@gambrose this could be implemented way simpler, but as I can see there's an implementation of debounce in JVM akka-streams-contrib module. It could be probably ported from there.
jasubabujasu
@jasubabujasu
Jun 14 2017 22:08
I'm using Akka.Presistence.Cassandra and previously used hyperion serilization and now trying to migrate to a json serializer. How do I migrate the data in the Message table that is serialized in a different format?
Marc Piechura
@marcpiechura
Jun 14 2017 23:13
@Horusiath @gambrose documentation for TimerGraphStageLogic can be found here http://getakka.net/docs/streams/customstreamprocessing#using-timers