Farfetch / kafkaflow

Apache Kafka .NET Framework to create applications simple to use and extend.
https://farfetch.github.io/kafkaflow/
MIT License
650 stars 119 forks source link

Feature - Allow admin commands consumers without producers or asp.net endpoints #313

Open EugeneKrapivin opened 2 years ago

EugeneKrapivin commented 2 years ago

Hey! I'm doing a small POC on a personal project (I'm also using KafkaFlow in a production project).

As part of the POC I'll be spinning up a number of services using KafkaFlow. I'd like to gather telemetry and be able to control them using the Admin Dashboard.

Current state

Each service with calling EnableTelemetry("kafka-flow.admin") enables both producers and consumers for telemetry.

Also, each project having webApi and a reference to KafkaFlow.Admin.WebApi will automagically get the administration controllers as well.

Suggestion

Separate the Admin control (Dashboard and APIs) and production (AdminProducer) from the consuming part. To allow to spin a standalone administration command and control from the actual services.

Pros

Cons

Thoughts? =)

Eugene.

filipeesch commented 2 years ago

Hi @EugeneKrapivin,

We (Douglas and I) thought about this feature in the past and we still believe that it makes sense.

We planned two different methods, like EnableTelemetryRead and EnableTelemetryWrite. The AdminProducer is no longer public and now we use the IConsumerAdmin interface with simplified methods, due to changes in how the Dashboard interacts with the application (it no longer uses the WebAPi project).