Skip to content

docs: add section on configuring multiple GTFS-realtime feeds#170

Open
Hitanshi7556 wants to merge 2 commits intoOneBusAway:mainfrom
Hitanshi7556:docs/multiple-gtfs-rt-feeds-v2
Open

docs: add section on configuring multiple GTFS-realtime feeds#170
Hitanshi7556 wants to merge 2 commits intoOneBusAway:mainfrom
Hitanshi7556:docs/multiple-gtfs-rt-feeds-v2

Conversation

@Hitanshi7556
Copy link
Copy Markdown

Closes #144

Changes

  • Added a new "Multiple GTFS-realtime Feeds" section to the realtime configuration guide
  • Shows how to configure multiple GtfsRealtimeSource beans, one per agency, each with its own agencyId
  • Includes a real-world example based on the HART + PSTA Tampa Bay deployment from the community discussion
  • Added a note about stop merging for agencies that share stops, with a link to the transit data bundle guide

Copilot AI review requested due to automatic review settings April 12, 2026 18:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 GtfsRealtimeSource beans (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.

Comment on lines +44 to +46
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.
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +44 to +48
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.
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +50 to +65
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" />
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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" />

Copilot uses AI. Check for mistakes.
Comment on lines +50 to +65
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" />
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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" />

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document the process of loading multiple GTFS-RT feeds

2 participants