Did you mean this page? 
http://doc.akka.io/docs/akka/current/java/stream/stream-error.html

It implies that the default supervision strategy is 'stop', and if I set it 
explicitly with

final Materializer materializer = ActorMaterializer.create(
ActorMaterializerSettings.create(system).withSupervisionStrategy(ex -> 
Supervision.stop()), system);

it doesn't seem to change anything.

With further testing, if I throw an exception during the processing of a 
custom graph stage near the sink feeding my SinkQueueWithCancel ('
unmarshallStage' in 
https://groups.google.com/forum/#!topic/akka-user/MjwhVE8kIAI ), I get the 
exception from the queue, but if I make a 'further away' stage throw an 
exception, like 'requestSourceStage' in that question, then the queue 
completes, but without error...

On Wednesday, September 20, 2017 at 12:46:48 AM UTC-7, Julian Howarth wrote:
>
>
> Have you read the error handling section 
> <http://doc.akka.io/docs/akka/current/java/stream/stream-customize.html> 
> of the documentation?
>
> You either need to use a SupervisionStrategy when creating your 
> ActorMaterializer. Or you need to use recover. Otherwise you will just have 
> the flow terminate without any indication of why. Either of these 
> approaches should allow you to at least log the errors and potentially 
> allow you to change the default behaviour of the flow. As I think your are 
> using custom GraphStages, note that by default they will not use the 
> SupervisionStrategy so recover may be the better approach.
>
> Julian
>
> On Wednesday, September 20, 2017 at 3:54:30 AM UTC+1, Bwmat wrote:
>>
>> For some more context, the flow throwing the exception was the one 
>> returned by getRequestToResponseFlow() in the code shown in the question at 
>> https://groups.google.com/forum/#!topic/akka-user/MjwhVE8kIAI
>>
>> The SinkQueueWithCancel was connected to the sinkshape 'in_sink' which is 
>> passed to the builder method in that question.
>>
>> On Tuesday, September 19, 2017 at 7:49:53 PM UTC-7, Bwmat wrote:
>>>
>>> I'm doing a PoC in akka streams, and I just had to track down a case 
>>> where the mapping functor in an instance of Flow.map() threw an exception. 
>>> This seems to simply close the stream, but _not_ report it anywhere. Other 
>>> stages were getting completed implicitly because of it, but the error 
>>> didn't seem to propagate.
>>>
>>> The end of my graph was a SinkQueueWithCancel created with Sink.queue(), 
>>> and I had a thread blocked in a call to 
>>> sinkQueue.pull().toCompletableFuture().get(). I would have expected the 
>>> graph's failure to cause this to throw?
>>>
>>> Also, I had logging set up as described in 
>>> https://groups.google.com/forum/#!topic/akka-user/rJHu7C8D3KQ , but I 
>>> didn't see any messages about an uncaught exception, which I would have 
>>> expected. (makes me think even more that I messed up the configuration 
>>> somehow?)
>>>
>>> Thanks,
>>> Matthew w.
>>>
>>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to