Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kafka Consumption in Unity

I'd like to visualize a Kafka stream using Unity3D. What's the best way to get access to the data stream in Unity?

I have written basic consumers in Node and C#, but I'm not sure how to incorporate them into Unity. Any help appreciated!

like image 280
Brian Gates Avatar asked Feb 02 '26 20:02

Brian Gates


1 Answers

I dont come with a complete solution, because I'am working on the problem currently. The main problem I encountered with unity3D is to execute things in a separate thread, separate from the game loop which is a thread itself. I you succeed to execute code outside of the game loop and then pass data between your thread and the main loop you are done. and You then should use https://github.com/confluentinc/confluent-kafka-dotnet

There is another problem, unity want manage every thing with the lib and it conflict with visual studio lib versions and with nugget. So you have to find a workflow to counter that. If you go full visual studio you will loose the unity interface simplicity. In general you import your lib and then unity mess it.

like image 155
Damien MIRAS Avatar answered Feb 05 '26 12:02

Damien MIRAS