Download the PHP package trainjunkies-packages/data-feeds-queue-subscriber without Composer
On this page you can find all versions of the php package trainjunkies-packages/data-feeds-queue-subscriber. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download trainjunkies-packages/data-feeds-queue-subscriber
More information about trainjunkies-packages/data-feeds-queue-subscriber
Files in trainjunkies-packages/data-feeds-queue-subscriber
Package data-feeds-queue-subscriber
Short Description Subscribe to Network Rail & National Rail data feed queues
License MIT
Informations about the package data-feeds-queue-subscriber
The Third Rail - Data Feeds Queue Subscriber
PHP package to consume Open Rail Data feeds from National Rail & Network Rail via Active MQ STOMP. Supports durable connections with server heartbeats.
Installation
via Composer
Install Composer and require the package with the below command.
Getting Started
National Rail - DARWIN PushPort
Signup to the National Rail Open Data feeds to generate your unique credentials. More information can be found on the Open Rail Data Wiki.
./scripts/national-rail
Network Rail - NROD, TRUST, TD
Signup to the Network Rail Open Data platform to generate a username and password for the feeds. Be sure to activate the Active MQ topics you wish to subscribe to. More information can be found on the Open Rail Data Wiki
Example code can be found in ./scripts/network-rail
Durable Subscription with heartbeats
Below example with request a durable connection with supplied Client ID and ActiveMQ subscription name expecting a heartbeat frame from the server every 20 seconds while emitting one every 5.
Development
Copy and complete .env.dist
to .env
with desired feed credentials.
The development environment and dependencies are managed with Docker. In the same directory as the checked out cloned repository, run the below command to start the Docker Compose environment.
Login to the app
container begin development.
Example scripts can be executed inside.
Xdebug has also been installed to debug PHP.
An ActiveMQ container is also present to aid development / debugging. The management interface can be accessed through a browser on http://localhost:8181/admin
with the credentials admin
& admin
.
Authors
- Ben McManus - bennoislost
See also the list of contributors who participated in this project
License
This project is licensed under the MIT License - see the LICENSE.md file for details