Kafka producer for the SIRI-VM feed, provided by the Bus Open Data Service from the UK Government's Department for Transport.
Clone the repository:
git clone https://github.com/GoTrackr/bods-sirivm-producer.git
cd bods-sirivm-producer
Install dependencies:
npm install
Build the project:
npm run build
Set the required environment variables (see Environment Variables).
Start the application:
npm start
The following environment variables need to be set for the application to run:
BODS_APIKEY
: Your API key for the Bus Open Data Service.BODS_HOST
: Host for the Bus Open Data Service (default: data.bus-data.dft.gov.uk
).BODS_OPERATORS
: Comma-separated list of operators.KAFKA_CLIENTID
: Client ID for Kafka (default: bods-sirivm-producer
).KAFKA_BROKERS
: Comma-separated list of Kafka brokers (default: localhost:9092
).KAFKA_TOPIC
: Kafka topic to produce to (default: vehicles-import-sirivm
).MINIMUM_SECONDS_BETWEEN_CALLS
: Minimum seconds between API calls (default: 26
).LOGGING
: Enable logging (default: false
).You can also run the application using Docker.
Build the Docker image:
docker build -t bods-sirivm-producer .
Run the Docker container:
docker run -e BODS_APIKEY= -e BODS_HOST=string -e BODS_OPERATORS=string -e KAFKA_CLIENTID=string -e KAFKA_BROKERS=string -e KAFKA_TOPIC=string -e MINIMUM_SECONDS_BETWEEN_CALLS=integer -e LOGGING=boolean bods-sirivm-producer
Alternatively, you can use Docker Compose:
Set the environment variables in the docker-compose.yml
file.
Start the services:
docker-compose up
Contributions are welcome! Please open an issue or submit a pull request.
This project is (currently) UNLICENSED.