Skip to content

Instantly share code, notes, and snippets.

@ktoso
Last active August 29, 2015 14:07
Show Gist options
  • Save ktoso/2965a1c5acf60cb81efd to your computer and use it in GitHub Desktop.
Save ktoso/2965a1c5acf60cb81efd to your computer and use it in GitHub Desktop.
final Subscriber<Integer> subscriber = UntypedActorSubscriber.create(ref);
final java.util.Iterator<Integer> input = Arrays.asList(1, 2, 3).iterator();
// wrong, because drain == scaladsl => extends scala.Drain, extends scala.Sink
Source.from(input).connect(new SubscriberDrain<Integer>(subscriber), materializer);
// wrong, because we only runWith DrainWithKey
// suggesting to allow runWith(SimpleDrain)?
Source.from(input).runWith(new SubscriberDrain<Integer>(subscriber), materializer);
@ktoso
Copy link
Author

ktoso commented Oct 8, 2014

// this is meant to replace produceTo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment