docs: add section on configuring multiple GTFS-realtime feeds#170
docs: add section on configuring multiple GTFS-realtime feeds#170Hitanshi7556 wants to merge 2 commits intoOneBusAway:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds documentation to the realtime configuration guide describing how to configure multiple GTFS-realtime feeds for multi-agency OneBusAway deployments, including a Tampa Bay (HART + PSTA) example and guidance about stop merging when agencies share stops.
Changes:
- Added a “Multiple GTFS-realtime Feeds” section describing multiple
GtfsRealtimeSourcebeans (one per agency). - Included a two-agency configuration example (HART + PSTA) with per-agency
agencyId. - Added a note and link to the transit data bundle guide for stop merging.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| If you are running a multi-agency instance of OneBusAway, you can configure multiple `GtfsRealtimeSource` beans in | ||
| your `data-sources.xml` file — one for each agency. Each bean should specify its own `agencyId` so that OneBusAway | ||
| can correctly match incoming real-time data to the right agency's static schedule data. |
There was a problem hiding this comment.
The new section mentions setting agencyId per bean, but it’s not explicit that this value must match the agency ID used in your bundled GTFS (i.e., the agency_id after any agencyIdMappings in the transit data bundle build), not necessarily the human-readable agency name. As written—and with the example mixing a full name and an acronym—this is easy to misread and can lead to a non-working config. Suggest clarifying what agencyId should be and aligning the example values accordingly.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| If you are running a multi-agency instance of OneBusAway, you can configure multiple `GtfsRealtimeSource` beans in | ||
| your `data-sources.xml` file — one for each agency. Each bean should specify its own `agencyId` so that OneBusAway | ||
| can correctly match incoming real-time data to the right agency's static schedule data. | ||
| The `agencyId` value must match the `agency_id` field in your bundled GTFS data exactly — you can find this value | ||
| in the `agency.txt` file of your GTFS feed. |
There was a problem hiding this comment.
This new section recommends one GtfsRealtimeSource bean per agency, but the guide earlier also shows the agencyIds list option. To avoid confusion for readers, please explicitly explain when to use multiple beans (separate feeds per agency) vs. a single bean with agencyIds (one feed containing multiple agencies), and note whether agencyId and agencyIds are mutually exclusive.
| Here is an example with two agencies, based on a real-world deployment combining HART and PSTA in the Tampa Bay area: | ||
|
|
||
| ~~~ | ||
| <!-- Agency 1: HART --> | ||
| <bean class="org.onebusaway.transit_data_federation.impl.realtime.gtfs_realtime.GtfsRealtimeSource"> | ||
| <property name="tripUpdatesUrl" value="http://realtime.prod.obahart.org:8088/trip-updates" /> | ||
| <property name="vehiclePositionsUrl" value="http://realtime.prod.obahart.org:8088/vehicle-positions" /> | ||
| <property name="refreshInterval" value="15" /> | ||
| <property name="agencyId" value="HART" /> | ||
| </bean> | ||
|
|
||
| <!-- Agency 2: PSTA --> | ||
| <bean class="org.onebusaway.transit_data_federation.impl.realtime.gtfs_realtime.GtfsRealtimeSource"> | ||
| <property name="tripUpdatesUrl" value="http://ridepsta.net/gtfsrt/trips" /> | ||
| <property name="vehiclePositionsUrl" value="http://ridepsta.net/gtfsrt/vehicles" /> | ||
| <property name="alertsUrl" value="http://ridepsta.net/gtfsrt/alerts" /> |
There was a problem hiding this comment.
The example hard-codes a real production endpoint (realtime.prod.obahart.org:8088) over plain HTTP. For documentation stability and to avoid encouraging reliance on third-party prod URLs, consider using placeholder/example domains (as earlier in this guide) or add an explicit note that these URLs are illustrative and must be replaced for a deployment.
| Here is an example with two agencies, based on a real-world deployment combining HART and PSTA in the Tampa Bay area: | |
| ~~~ | |
| <!-- Agency 1: HART --> | |
| <bean class="org.onebusaway.transit_data_federation.impl.realtime.gtfs_realtime.GtfsRealtimeSource"> | |
| <property name="tripUpdatesUrl" value="http://realtime.prod.obahart.org:8088/trip-updates" /> | |
| <property name="vehiclePositionsUrl" value="http://realtime.prod.obahart.org:8088/vehicle-positions" /> | |
| <property name="refreshInterval" value="15" /> | |
| <property name="agencyId" value="HART" /> | |
| </bean> | |
| <!-- Agency 2: PSTA --> | |
| <bean class="org.onebusaway.transit_data_federation.impl.realtime.gtfs_realtime.GtfsRealtimeSource"> | |
| <property name="tripUpdatesUrl" value="http://ridepsta.net/gtfsrt/trips" /> | |
| <property name="vehiclePositionsUrl" value="http://ridepsta.net/gtfsrt/vehicles" /> | |
| <property name="alertsUrl" value="http://ridepsta.net/gtfsrt/alerts" /> | |
| Here is an illustrative example with two agencies. Replace the sample URLs with the GTFS-realtime endpoints for your own deployment: | |
| ~~~ | |
| <!-- Agency 1: HART --> | |
| <bean class="org.onebusaway.transit_data_federation.impl.realtime.gtfs_realtime.GtfsRealtimeSource"> | |
| <property name="tripUpdatesUrl" value="http://realtime.example.com/hart/trip-updates" /> | |
| <property name="vehiclePositionsUrl" value="http://realtime.example.com/hart/vehicle-positions" /> | |
| <property name="refreshInterval" value="15" /> | |
| <property name="agencyId" value="HART" /> | |
| </bean> | |
| <!-- Agency 2: PSTA --> | |
| <bean class="org.onebusaway.transit_data_federation.impl.realtime.gtfs_realtime.GtfsRealtimeSource"> | |
| <property name="tripUpdatesUrl" value="http://realtime.example.com/psta/trips" /> | |
| <property name="vehiclePositionsUrl" value="http://realtime.example.com/psta/vehicles" /> | |
| <property name="alertsUrl" value="http://realtime.example.com/psta/alerts" /> |
| Here is an example with two agencies, based on a real-world deployment combining HART and PSTA in the Tampa Bay area: | ||
|
|
||
| ~~~ | ||
| <!-- Agency 1: HART --> | ||
| <bean class="org.onebusaway.transit_data_federation.impl.realtime.gtfs_realtime.GtfsRealtimeSource"> | ||
| <property name="tripUpdatesUrl" value="http://realtime.prod.obahart.org:8088/trip-updates" /> | ||
| <property name="vehiclePositionsUrl" value="http://realtime.prod.obahart.org:8088/vehicle-positions" /> | ||
| <property name="refreshInterval" value="15" /> | ||
| <property name="agencyId" value="HART" /> | ||
| </bean> | ||
|
|
||
| <!-- Agency 2: PSTA --> | ||
| <bean class="org.onebusaway.transit_data_federation.impl.realtime.gtfs_realtime.GtfsRealtimeSource"> | ||
| <property name="tripUpdatesUrl" value="http://ridepsta.net/gtfsrt/trips" /> | ||
| <property name="vehiclePositionsUrl" value="http://ridepsta.net/gtfsrt/vehicles" /> | ||
| <property name="alertsUrl" value="http://ridepsta.net/gtfsrt/alerts" /> |
There was a problem hiding this comment.
Same concern as above: this uses a specific external agency URL over plain HTTP. To keep the guide evergreen and avoid directing users to depend on a third-party endpoint, consider using placeholder URLs or add a clear disclaimer that these are sample URLs from a community deployment and may change or be unavailable.
| Here is an example with two agencies, based on a real-world deployment combining HART and PSTA in the Tampa Bay area: | |
| ~~~ | |
| <!-- Agency 1: HART --> | |
| <bean class="org.onebusaway.transit_data_federation.impl.realtime.gtfs_realtime.GtfsRealtimeSource"> | |
| <property name="tripUpdatesUrl" value="http://realtime.prod.obahart.org:8088/trip-updates" /> | |
| <property name="vehiclePositionsUrl" value="http://realtime.prod.obahart.org:8088/vehicle-positions" /> | |
| <property name="refreshInterval" value="15" /> | |
| <property name="agencyId" value="HART" /> | |
| </bean> | |
| <!-- Agency 2: PSTA --> | |
| <bean class="org.onebusaway.transit_data_federation.impl.realtime.gtfs_realtime.GtfsRealtimeSource"> | |
| <property name="tripUpdatesUrl" value="http://ridepsta.net/gtfsrt/trips" /> | |
| <property name="vehiclePositionsUrl" value="http://ridepsta.net/gtfsrt/vehicles" /> | |
| <property name="alertsUrl" value="http://ridepsta.net/gtfsrt/alerts" /> | |
| Here is an example with two agencies using illustrative sample endpoints. Replace these URLs with the GTFS-realtime endpoints for your own deployment: | |
| ~~~ | |
| <!-- Agency 1: HART --> | |
| <bean class="org.onebusaway.transit_data_federation.impl.realtime.gtfs_realtime.GtfsRealtimeSource"> | |
| <property name="tripUpdatesUrl" value="http://hart.example.com/gtfs-realtime/trip-updates" /> | |
| <property name="vehiclePositionsUrl" value="http://hart.example.com/gtfs-realtime/vehicle-positions" /> | |
| <property name="refreshInterval" value="15" /> | |
| <property name="agencyId" value="HART" /> | |
| </bean> | |
| <!-- Agency 2: PSTA --> | |
| <bean class="org.onebusaway.transit_data_federation.impl.realtime.gtfs_realtime.GtfsRealtimeSource"> | |
| <property name="tripUpdatesUrl" value="http://psta.example.com/gtfs-realtime/trip-updates" /> | |
| <property name="vehiclePositionsUrl" value="http://psta.example.com/gtfs-realtime/vehicle-positions" /> | |
| <property name="alertsUrl" value="http://psta.example.com/gtfs-realtime/alerts" /> |
Closes #144
Changes