Search code examples
azurestompazure-queues

Reading STOMP feeds from an Azure service


I'm wondering if it's possible to connect to a STOMP feed from Azure and process the data i.e. add it to a database or save in a Storage Account.

Context: Network Rail have their openraildata feeds which are STOMP and instead of having a Virtual Machine constantly running in Azure, I'd like to use Azure to subscribe to one of their feeds.

The Azure Service Bus lets me create my own topics for me to create and others to use but I would like to have it connect to another.


Solution

  • I haven't done this yet, but recently I've created a tcp listener to receive geolocation from chinese iot devices. I've endup creating a Worker Role, which gives me the ability to listen to specific ports (such as 61618 for the stomp network rail) but won't require you to manage the virtual machine.

    I've followed the article below. I believe you just need to do a few changes (according to the provided railroad sample in c#)

    http://prabathsl.blogspot.com/2015/04/server-socket-tcp-with-microsoft-azure.html

    Just noticed I forgot to answer part of your question. You can't use Azure Service Bus to listen to the stomp feed directly, but you can use the previous idea, and in the middle of the listener, add a message to a queue, which will notify the subscribers.