title: How to recover from Exception thrown in Akka Streams Sink?
body: <p>How can I recover from an exception thrown in the Sink of Akka Streams?</p>
  
  <p>Simple Example:</p>
  
  <pre><code>    Source&lt;Integer, NotUsed&gt; integerSource = Source.from(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9));
  
      integerSource.runWith(Sink.foreach(x -&gt; {
        if (x == 4) {
          throw new Exception("Error Occurred");
        }
        System.out.println("Sink: " + x);
      }), system);
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Sink: 1
  Sink: 2
  Sink: 3
  </code></pre>
  
  <p>How can I handle the exception and move on to the next element from the source? (aka 5,6,7,8,9)</p>