Jim Doyle - 2012-07-16

I've built a JMS Message Pumping daemon for the VehicleLocations data feed. The implementation
uses Spring Integration components such as a custom POJO Channel Adapter, a Splitter, a Header
Enricher, and finally an Output Channel adapter to send VL data to either a Topic or a Queue. The
Pumper uses a scheduler task to scan a worklist every minute. When VL data is more than 5-minutes old,
a new update is obtained from the NextBus XML adapter and pushed up to JMS.

Since this is Spring Integration, you should have no problems fitting this code to other JMS Providers other than ActiveMQ which is the out-of-box implementation.

Since the JMS Header is populated with Agency, Route, Direction, as well as Latitude and Longitude,
it's very simple for a client to Subscribe to a JMS Topic based on any expression relating these
attributes. For instance, you could feed off any Vehicle on a given route, or, you could even feed
on Any Vehicle on Any Route that is within some rectangular latitude/longitude box. In fact, my
first demo client that I'll write next will be a sort of "Bus Radar Scope" that will display bus
activity based on some arbitary center point.. I'll likely be coding that in JFC Swing too and it
will use a client-side message drive bean to pull from a JMS Topic.

The code for this new tool is in the SVN repo at https://sourceforge.net/projects/nextbusapi/

-- Jim