Skip to content

About

A simple webserver built with Rocket and Tera templates that produces Kafka messages

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Webserver

This is a simple webserver built with Rocket and Tera. For the serializers it works with Serde. For more details look at Cargo.

For this test project it produces messages to a Kafka topic, it works with rdkafka.

Run the server

First setup a Kafka broker and create a topic. Then update this project to match the host and the topic (I still need to create a conf file). You can update the topic in the main.rs in L34, and the host in producer.rs in L8.

Then run the project with cargo run and access to http://127.0.0.1:8000. Submit the form and see the messages that you receive in the Kafka topic, it will produce the messages as JSON Strings. For now the Kafka key is hardcoded to event1, this is in my TODO.

About

A simple webserver built with Rocket and Tera templates that produces Kafka messages

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages