Hi guys, I’m trying to make a program that can start multiple tcp, tcp with ssl, or udp servers with tokio and send each line to a kafka server. This was my first time interacting with Tokio and Futures. I already wasn’t too great with lifetimes, so there might be some obscure parts of the code that exist because I couldn’t find a proper solution.
Would love to have some feedback on what better practices I should do. Specifically that lazy_static config setup. I wasn’t able to pass a reference to the topic.
I also was thinking of the idea of just having the Futures from the functions returns a line which just gets sent through a function to send to kafka but I’m not sure how much that would affect performance.