Connecting TransitClock to Kafka

132 views
Skip to first unread message

manupan...@gmail.com

unread,
Apr 26, 2020, 7:18:13 AM4/26/20
to TheTransitClock
Hi ,
     what I wanted to do is connect transit clock to my Kafka broker and read vehicalPosition from one of its topic (say vehicalPositionTopic) then publish the GTFS-realtime trip updates to another Kafka topic (let say tripUpdateTopic) can you tell me what should I modify, there is one line `Create transiTime module to read real-time GPS data or create a converter to convert the realtime data source to a GTFS-RT vechicle location source` which I think refer to my solution but I cannot find anything else related to that can you point me to an example or documentation, after digging into the code I can see that GtfsRtVehiclePositionsReaderBase file have some logic related to fetching RT-vehical position I am on the right path,

Óg Crudden

unread,
Apr 26, 2020, 7:55:35 AM4/26/20
to manupan...@gmail.com, TheTransitClock
Hi Manu,

I am not familiar with Kafka at all. 

The standard method for reading vehicle position data into TheTransitClock is from a GTFS-realtime vehicle positions feed. For this method to work for you will need to provide the GTFS-realtime vehicle protocol buffer file on a URL. 


The trip updates are made available on a URL in GTFS-realtime format. Again I am not familiar with Kafka to know if it is possible to publish this directly to another topic.

Hope this helps and thanks for the interest in the project.

Cheers,

Sean.

On Sun, Apr 26, 2020 at 12:18 PM <manupan...@gmail.com> wrote:
Hi ,
     what I wanted to do is connect transit clock to my Kafka broker and read vehicalPosition from one of its topic (say vehicalPositionTopic) then publish the GTFS-realtime trip updates to another Kafka topic (let say tripUpdateTopic) can you tell me what should I modify, there is one line `Create transiTime module to read real-time GPS data or create a converter to convert the realtime data source to a GTFS-RT vechicle location source` which I think refer to my solution but I cannot find anything else related to that can you point me to an example or documentation, after digging into the code I can see that GtfsRtVehiclePositionsReaderBase file have some logic related to fetching RT-vehical position I am on the right path,

--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thetransitclock/3fa22042-dd3a-4ade-ba3c-a4447338209b%40googlegroups.com.

Vicente Pérez

unread,
Apr 26, 2020, 2:38:22 PM4/26/20
to Óg Crudden, manupan...@gmail.com, TheTransitClock
Hi,


What I would do is to create a small module (out of The Transit Clock) with a consumer of kafka and to create a gtfs feed from the information. On the other extreme, the same... To read gtfs real time information each x seconds and to produce messages to kafka. After doing that, you might try to put it inside The Teansit Clock. 

Regards 
Vicente 


Sean Barbeau

unread,
Apr 26, 2020, 8:05:30 PM4/26/20
to TheTransitClock
There are some open source X to GTFS-realtime convertors here that might be a good model to follow:
https://github.com/CUTR-at-USF/awesome-transit/blob/master/README.md#gtfs-realtime-convertors

Sean

Reply all
Reply to author
Forward
0 new messages