These are chat archives for akkadotnet/akka.net

7th
Mar 2018
TonyLo1
@TonyLo1
Mar 07 2018 09:36
@Horusiath, hi, trying to run your akkling streams client server example. Get runtime exception from Graph.run mat. System.InvalidCastException: 'Unable to cast object of type 'Akka.NotUsed' to type 'Microsoft.FSharp.Core.Unit'.' Following the flow types I dont see why this is a problem but it is for some reason. I have tried both the nuget 0.8 version of the libs plus downloaded the source and rebuilt and still get the same problem. Any ideas?
chipdice
@chipdice
Mar 07 2018 13:10

I am trying to implement a PriorityMailbox but getting the following error. My mailbox extends UnboundedPriorityMailbox and overrides PriorityGenerator. I seem to have the hocon configured properly but get the following exception. I am using akka 1.2.3. Cn anyone clarify what I am missing?

Akka.Configuration.ConfigurationException
HResult=0x80131500
Message=Configuration problem while creating [akka://PMTBetaActorSystem/user/ConnectionManager/ConsolidationController-bd1d6104-e65b-4cb6-9b0c-9060586b8575/StreamingConsolidator] with dispatcher [akka.actor.default-dispatcher] and mailbox [user-request-priority]
Source=Akka
StackTrace:
at Akka.Actor.LocalActorRefProvider.ActorOf(ActorSystemImpl system, Props props, IInternalActorRef supervisor, ActorPath path, Boolean systemService, Deploy deploy, Boolean lookupDeploy, Boolean async)
at Akka.Remote.RemoteActorRefProvider.LocalActorOf(ActorSystemImpl system, Props props, IInternalActorRef supervisor, ActorPath path, Boolean systemService, Deploy deploy, Boolean lookupDeploy, Boolean async)
at Akka.Remote.RemoteActorRefProvider.ActorOf(ActorSystemImpl system, Props props, IInternalActorRef supervisor, ActorPath path, Boolean systemService, Deploy deploy, Boolean lookupDeploy, Boolean async)
at Akka.Actor.ActorCell.MakeChild(Props props, String name, Boolean async, Boolean systemService)
at Akka.Actor.ActorCell.ActorOf(Props props, String name, Boolean isAsync, Boolean isSystemService)
at Akka.Actor.ActorCell.ActorOf(Props props, String name)
at PMTPositionConsolidation.Actors.Consolidation.ConsolidatorSupervisor.HandleUserViewMessage(UserViewRequest uvr) in C:_Work_WebServerDev\Firm.PMTPositionConsolidatorService\PMTPositionConsolidation\Actors\Consolidation\ConsolidatorSupervisor.cs:line 87

Inner Exception 1:
ArgumentException: produced message queue type of [Akka.Dispatch.MessageQueues.UnboundedPriorityMessageQueue] does not fulfill requirement for actor class [PMTPositionConsolidation.Actors.Consolidation.Consolidator].Must be a subclass of [Akka.Dispatch.MessageQueues.IMessageQueue]

chipdice
@chipdice
Mar 07 2018 13:35
Ah, I see. My actor Implements IWithUnboundedStash so UnboundedPriorityMailbox is not the correct class to extend (I see the note on this about stashing, however the docs say that UnboundedPriorityMailbox supports stashing. Maybe not with the version I am running?)
Martin Clode
@MClode
Mar 07 2018 14:06
Anyone know why running something like |> Source.batch ((int64)10) (fun x -> [x]) (fun acc x -> x::acc) |> Source.runForEach ... would result in running on a batch size of 1 all the time?
Marc Piechura
@marcpiechura
Mar 07 2018 14:22
@MClode because batch only collects if your consumer is slower than your producer
Add Source.throttle before runForEach , that should backpressure and therefore force the batch to actually batch elements
Martin Clode
@MClode
Mar 07 2018 14:35
Thanks @marcpiechura :)
Bartosz Sypytkowski
@Horusiath
Mar 07 2018 15:05
@TonyLo1 are you talking about Akka TCP client/server streams? I've found that bug some time ago, I'll try to fix it in the latest update
TonyLo1
@TonyLo1
Mar 07 2018 15:06
@Horusiath - yes the TCP client/server streams, great thanks
Aaron Stannard
@Aaronontheweb
Mar 07 2018 16:03
@chipdice I thought we patched that bug around 1.2.3 or earlier
aha
I stand corrected
akkadotnet/akka.net#2649
fixed that in the 1.3.0 release
Edson Flores Palma
@Efp95
Mar 07 2018 17:09
Hello, is it somehow to set a gossip-interval for Akka.DistributedData?
Bartosz Sypytkowski
@Horusiath
Mar 07 2018 18:41
@Efp95 akka.cluster.distributed-data.gossip-interval = 2s (by default it's 2 sec)
Edson Flores Palma
@Efp95
Mar 07 2018 18:48
Wow, didn't realize. Thanks!