Connecting with Stomp: Difference between revisions
PeterHicks (talk | contribs) m Remove legacy Darwin v12 feed documentation |
|||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
[https://stomp.github.io/ Stomp] is a Simple Text-Oriented Messaging Protocol, used by the [[ | [https://stomp.github.io/ Stomp] is a Simple Text-Oriented Messaging Protocol, used by the [[About the Network Rail feeds|Network Rail]] and [[About the NRE Feeds|National Rail Enquiries]] Data Feeds platforms. | ||
= Clients = | = Clients = | ||
Line 13: | Line 13: | ||
{|class='wikitable' | {|class='wikitable' | ||
!Hostname | !Hostname | ||
| | |publicdatafeeds.networkrail.co.uk | ||
|- | |- | ||
!Port | !Port | ||
Line 19: | Line 19: | ||
|- | |- | ||
!Username | !Username | ||
|The username you use to sign in to [https:// | |The username you use to sign in to [https://publicdatafeeds.networkrail.co.uk https://publicdatafeeds.networkrail.co.uk] | ||
|- | |- | ||
!Password | !Password | ||
|The password you use to sign in to [https:// | |The password you use to sign in to [https://publicdatafeeds.networkrail.co.uk https://publicdatafeeds.networkrail.co.uk] | ||
|} | |} | ||
Line 29: | Line 29: | ||
It's recommended that you use a [[Durable_Subscription|durable subscription]], which will keep any pending messages for you for a total of five minutes after you disconnect. | It's recommended that you use a [[Durable_Subscription|durable subscription]], which will keep any pending messages for you for a total of five minutes after you disconnect. | ||
== National Rail Enquiries == | == National Rail Enquiries (Darwin v16) == | ||
{|class='wikitable' | {|class='wikitable' | ||
!Hostname | !Hostname | ||
| | |The hostname displayed on the 'My Feeds' screen on [https://opendata.nationalrail.co.uk https://opendata.nationalrail.co.uk] | ||
|- | |- | ||
!Port | !Port | ||
Line 39: | Line 39: | ||
|- | |- | ||
!Username | !Username | ||
|The username displayed on the 'My Feeds' screen on [https:// | |The username displayed on the 'My Feeds' screen on [https://opendata.nationalrail.co.uk https://opendata.nationalrail.co.uk] | ||
|- | |- | ||
!Password | !Password | ||
|The password displayed on the 'My Feeds' screen on [https:// | |The password displayed on the 'My Feeds' screen on [https://opendata.nationalrail.co.uk https://opendata.nationalrail.co.uk] | ||
|} | |} | ||
Line 50: | Line 50: | ||
There is no need to use a durable subscription, as you will receive each message on your own queue exactly once, and messages will be queued for a total of five minutes after you disconnect. | There is no need to use a durable subscription, as you will receive each message on your own queue exactly once, and messages will be queued for a total of five minutes after you disconnect. | ||
[[Category:Network Rail Data Feeds]] | |||
[[Category:National Rail Enquiries Data Feeds]] |
Latest revision as of 15:27, 3 October 2023
Stomp is a Simple Text-Oriented Messaging Protocol, used by the Network Rail and National Rail Enquiries Data Feeds platforms.
Clients
A number of code examples are available, which are tailored to the Network Rail data feeds.
Clients which will work on either the Network Rail or National Rail Enquiries feeds are currently being written and will be available on the openraildata organisation on GitHub.
Connection details
Network Rail
Hostname | publicdatafeeds.networkrail.co.uk |
---|---|
Port | 61618 |
Username | The username you use to sign in to https://publicdatafeeds.networkrail.co.uk |
Password | The password you use to sign in to https://publicdatafeeds.networkrail.co.uk |
Messages are delivered on topics. You should subscribe to each topic as /topic/<topic-name>
.
It's recommended that you use a durable subscription, which will keep any pending messages for you for a total of five minutes after you disconnect.
National Rail Enquiries (Darwin v16)
Hostname | The hostname displayed on the 'My Feeds' screen on https://opendata.nationalrail.co.uk |
---|---|
Port | 61613 |
Username | The username displayed on the 'My Feeds' screen on https://opendata.nationalrail.co.uk |
Password | The password displayed on the 'My Feeds' screen on https://opendata.nationalrail.co.uk |
All message bodies are compressed with gzip, and you will need to un-compress them when you receive them.
Messages are delivered on per-user queues. Your queue name is on the 'My Feeds' screen, and you should subscribe to the queue as /queue/<queue-name>
.
There is no need to use a durable subscription, as you will receive each message on your own queue exactly once, and messages will be queued for a total of five minutes after you disconnect.