0

My .NET application is stored procedure intensive and I need to create a Kafka topic from a stored procedure. I have a key process that is running on stored procedure and at the end of that process, I need to create a Kafka topic to trigger the next process from another .NET service. Do we have any documentation for using Kafka in a stored procedure. We use confluent's Kafka.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
JSLover
  • 45
  • 7

1 Answers1

0

Functions in .NET applications are not "stored procedures". Sure, you can use AdminClient class from Confluent library to create topics.


If you literally meant a database stored procedure, and your stored procedure can run arbitrary C# code (which isn't safe), you can do the same, but you could also shell out to kafka-topics.sh script..

Alternatively, create your topic elsewhere, and use tools like Debezium to read from the database into Kafka topics, keeping database logic internal to the database. (Have your stored proc write to a new table, if needed)

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245