Add streaming interface for pubsub publishers
lthibault opened this issue · 0 comments
lthibault commented
It is common for pubsub.Topic.Publish()
to be called repeatedly in order to stream events to a topic. However, this method blocks until the RPC call round-trips, which degrades performance. While we currently expose PublishAsync
, the proper management of stream state is a non-trivial task, so we should expose a NewStream()
method that integrates with CASM's pkg/util/stream
.
It may be worthwhile to reuse code from #59.