publishAndSaveFromStream method

EventBus publishAndSaveFromStream(
  1. Stream<Object> stream,
  2. String id
)

Publishes and saves messages as the stream emits.

Implementation

EventBus publishAndSaveFromStream(Stream<Object> stream, String id) {
  final subscription = stream.listen(publishAndSave);
  _subscriptionManager.replaceById(subscription, id);
  return this;
}