Skip to content

producer and consumer FastAPI endpoints to handle incoming geo data

License

Notifications You must be signed in to change notification settings

martincolladodev/geo-stream-kafka

 
 

Repository files navigation

geo-stream-kafka

setup geostream fastapi aiokafka

geostream gif

see blogpost for a more detailed description

docker-compose up -d

If you're on MacOS set an environment variable like:

export DOCKER_KAFKA_HOST=$(ipconfig getifaddr en0)

that is afterwards used in docker-compose.yml to identify the KAFKA_ADVERTISED_HOST_NAME. Some similar workaround has to exist for Windows users. For linux I assume you can just set it to localhost if you're only running on Kafka node. See github.com/wurstmeister/kafka-docker/wiki/Connectivity.

Kafka

Kafka will be served on localhost:9092

Frontend

open /geostream/frontend/app/index.html and associated map.js will consume messages when they come in

Producer

can produce messages to a topic at localhost:8002/producer/<topicname>

Consumer

can consume kafka messages through at localhost:8003/consumer/<topicname>

About

producer and consumer FastAPI endpoints to handle incoming geo data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 59.8%
  • Jupyter Notebook 28.7%
  • JavaScript 5.7%
  • HTML 3.1%
  • Dockerfile 1.8%
  • CSS 0.9%