getStream method
Returns a stream of events delivered by this socket.
Consider using HubConsumerService.listen instead.
HubEvents are expected to be acknowledged or rejected by the consumer.
Subscribing twice inside of the same service (even across instances)
will result in competing consumers. The service is identified via
the config value datahub.serviceName
.
Implementation
Stream<HubEvent<T>> getStream({int? prefetch}) =>
_hub.subscribe<T>(topic, bean: bean, prefetch: prefetch);