Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1365

Get last element of stream on recover

$
0
0

Hey guys,

Let’s say we have any flow and during processing, an exception occurs because of an element.
Is it possible to get the element itself to handle the exception?

I’m aware of flow.mapError() to transform exceptions and also flow.recover() to map an exception to an element of the stream. Exceptions may occur also because of side effects, which are independent to the stream, but sometimes not.

Sometimes the causing element would be very interesting for handling the error. Is there any option to get the last element? Maybe a special buffer flow could handle that.

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 1365

Trending Articles