Blazor Server - How to notify user sessions of each kafka message consumed and updated web page?

596 Views Asked by At

I am new to Kafka and am using Kafka Dotnet Confluent, considering the following architecture within ASP.NET Core Blazor Server web application architecture

Due to the expense associated with a consumer, I have read that it is recommended to have a singleton kafka consumer per process. This executes within a long running task that lasts for the process lifetime.

If I want logged in users to be able to receive updates on an application page to monitor messages received from kafka topic .........how can I get each user's scoped service to automatically receive notification of consumed messages and update the page?

  1. SignalR?
  2. Posting an event (for each consumed message) to an event bus, eg. NServiceBus, Rebus etc? Each frontend page refreshes upon notification of an event received from the event bus.....
  3. API to act as a front end to the kafka topic. Each front end page for the logged in user then frequently polls the API to refresh?
0

There are 0 best solutions below