streamForTopic method

Stream<Message> streamForTopic(
  1. String topic
)

A stream yielding Message instances for a given topic.

The PhoenixChannel for this topic may not be open yet, it'll still eventually yield messages when the channel is open and it receives messages.

Implementation

Stream<Message> streamForTopic(String topic) => _topicStreams.putIfAbsent(
    topic, () => _streamRouter.route((event) => event.topic == topic));