Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 13 18:54
    skataben commented #241
  • Mar 13 18:50
    Aaronontheweb commented #241
  • Mar 13 18:44
    skataben commented #241
  • Jan 20 15:51
    LBognanni opened #304
  • Jan 20 11:58
    claassistantio commented #303
  • Jan 20 11:57
    claassistantio commented #303
  • Jan 20 11:57
    LBognanni opened #303
  • Dec 04 2019 10:14
    kashifwajidRG commented #207
  • Dec 04 2019 10:13
    kashifwajidRG commented #207
  • Nov 09 2019 23:28
    CLAassistant commented #302
  • Nov 09 2019 23:27
    ravish-tech opened #302
  • Oct 18 2019 18:10
    Aaronontheweb closed #301
  • Oct 18 2019 17:53
    devguy85 commented #301
  • Oct 18 2019 17:52
    CLAassistant commented #301
  • Oct 18 2019 17:52
    devguy85 opened #301
  • Oct 16 2019 22:19
    skydvr commented #292
  • Oct 15 2019 16:20
    Aaronontheweb closed #296
  • Oct 15 2019 16:20
    Aaronontheweb commented #296
  • Oct 15 2019 16:20

    Aaronontheweb on master

    #296 link to docs is broken - f… (compare)

  • Oct 15 2019 16:20
    Aaronontheweb closed #300
Fadi Scavo
@fadiscavo_twitter
I'm refering to what is written in the section "integration"
I have a stream that pushes items to a SignalR actor. I want the stream to stop when SignaR actor responds with Status.Failure or Exception.
I couldn't make it work. The stream does not complete after responding with Status.Failure.
Aaron Stannard
@Aaronontheweb
in that very specific example it's true
because you're using an Ask operation
Status.Failure is specific to TPL operations inside Akka.NET
you should be able to specify a completion message depending on what your source is
are you using a custom Akka.Streams stage?
Fadi Scavo
@fadiscavo_twitter
IRunnableGraph<NotUsed> graph = Source.From(query)
.GroupedWithin(500, TimeSpan.FromMilliseconds(100))
.SelectAsync(parallelism: 1, items => signalrClientActor.Ask(request.WithData(dataEnvelope.WithData(items))))
.To(Sink.OnComplete<object>(
() =>
{
scope.Dispose();
}, ex =>
{
scope.Dispose();
}));
        graph.Run(Context.Materializer());
This is what I'm doing
I want the stream to stop when
ignalrClientActor.Ask(request.WithData(dataEnvelope.WithData(items)))
returns Status.Failure
Aaron Stannard
@Aaronontheweb
ok, that should stop it if you reply back to the actor with a Status.Failure
Fadi Scavo
@fadiscavo_twitter
And the OnComplete should be called, I suppose
Is the behaviour same if I throw exception from Signalr actor?
Aaron Stannard
@Aaronontheweb
no, that information needs to be passed back via message to the actors running the Akka.Stream under the covers
if SignalR is running as a graph stage inside Akka.Streams
then yes - having that actor fail would cause the stream to terminate
Fadi Scavo
@fadiscavo_twitter
How can I know whether the completion is happening due to error from SignalR actor or not? Actually, I need to send a message when stream is completed successfully.
I don't wanna this message to be sent when SignalR actor completes the stream with failure.
Is there a quick solution for this? or should I create a custom stage?
Aaron Stannard
@Aaronontheweb
I'd create a custom stage
we should have one
Fadi Scavo
@fadiscavo_twitter
Thanks for your support, Aaron
Is there a way to get the context of user guardian?
I need it to call GetChildren()
Fadi Scavo
@fadiscavo_twitter
How can we write a unit test for a message handler that creates a child actor? I solved this by exposing a virtual method that creates the child actor. So, I can override it in unit tests.
Is there a better way?
Aaron Stannard
@Aaronontheweb
Is there a way to get the context of user guardian?
no, by design
but you can do Context.ActorSelection("/user/*).Tell(new Identify(null))
and all of the top-level actors (children of user guardian) will reply back
with an ActorIdentity message
Is there a better way?
we did just add a new set of tools for doing this in Akka.NET v1.4.0-beta4
1.4.0 should be released VERY soon
working on QA for it
Fadi Scavo
@fadiscavo_twitter

@fadiscavo_twitter

How can we write a unit test for a message handler that creates a child actor? I solved this by exposing a virtual method that creates the child actor. So, I can override it in unit tests.

Do you have an answer for this one? Thanks

I think the answer is in the version 1.4.0
Fadi Scavo
@fadiscavo_twitter
I think there is a bug in Akka.Stream SelectAsync
I does not fail at all
Based on the following code:
private void HolderCompleted(Holder<TOut> holder)
{
var element = holder.Element;
if (!element.IsSuccess && decider(element.Exception) == Akka.Streams.Supervision.Directive.Stop)
{
FailStage(element.Exception);
}
else if (IsAvailable(stage.Out))
{
PushOne();
}
}
The property "IsSuccess" is always TRUE, even though the return response from the actor is either Status.Failure(new Exception()) or Status.Failure(null)
I think the bug is in the following code:
Fadi Scavo
@fadiscavo_twitter
result.Value has always a value and never null
public void SetElement(Akka.Util.Result<T> result)
{
this.Element = result.IsSuccess && result.Value == null
? Akka.Util.Result.Failure<T>(ReactiveStreamsCompliance.ElementMustNotBeNullException)
: result;
}
Amir Shitrit
@AmirShitrit
Hi everyone,
I have a question about routers, broadcast groups, and sending a single message to multiple actors (via ActorSelection with wildcards). The question is whether such messages have a transactional all-or-nothing semantics with respect to the receiving actors?
Thanks,
Amir