Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cypressxyx/realtime-bus-transit-kafka-python
Realtime bus transit data with Kafka + Python
https://github.com/cypressxyx/realtime-bus-transit-kafka-python
Last synced: 23 days ago
JSON representation
Realtime bus transit data with Kafka + Python
- Host: GitHub
- URL: https://github.com/cypressxyx/realtime-bus-transit-kafka-python
- Owner: Cypressxyx
- Created: 2020-05-08T05:20:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-06T02:06:03.000Z (almost 4 years ago)
- Last Synced: 2024-03-07T20:29:01.504Z (8 months ago)
- Language: JavaScript
- Size: 18 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LIVE LA METRO TRANSIT WITH KAFKA, REACT, PYTHON
![Preview of react app](images/preview.png)
# Running Script
Run python script with the bus route number
ex.) in 1 terminal run ```python3.7 main.py 45```in another terminal run ```python3.7 main.py 233```
# Setting Up
run```kafka-topics --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic liveBusData```
# Misc. Information
## LocalHost
Default is localhost:2181## Run zookeeper before running kafka
```
zookeeper-server-start /usr/local/etc/kafka/zookeeper.properties
```## Start the kafka server
```
kafka-server-start /usr/local/etc/kafka/server.properties
```## Creating a Kafka Topic CLI
```kafka-topics --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test```## Listening to a Kafka Producer
```kafka-console-consumer --bootstrap-server localhost:9092 --topic liveBusData --from-beginning```## Installing kafka on mac with brew
Install Java
```
brew cask install java
```Install kafka
```
brew install kafka
```