I have a GRPC Service using protobuf-net.Grpc where I use Server Streaming to send messages back to the client. I'm using Azure App Services, so I thought I would use an Azure Service Bus and Mass Transit to wait for messages/events and send them back to the client.
public async IAsyncEnumerable<TestResult> SubscribeAsync([EnumeratorCancellation] CancellationToken cancel)
{
while (!cancel.IsCancellationRequested)
{
// wait for new mass transit message
yield return new TestResult { Result = MessageContent };
}
}
Is something like this even possible using mass transit, or would I need some kind of observable queue.