Azure Event Hubs is a highly scalable publish-subscribe service that can ingest millions of events per second and stream them into multiple applications. This lets you process and analyse the massive amounts of data produced by your connected devices and applications. Once Event Hubs has collected the data, transform and store it by using any real-time analytics provider or with batching/storage adapters.
Reekoh has released the newest addition to its collection of Stream plugins – the Azure Event Hub Stream Plugin. This plugin enables you to subscribe to device or sensor data being sent to an Azure Event Hub and be able to consume or ingest it into Reekoh and into your topologies.
To see how this plugin works, we’re going to walk through a scenario of using SIGFOX devices and Azure Event Hub.
Let’s start off by setting up your Azure Event Hub. Log in to the Microsoft Azure Portal, and then navigate to Event Hubs on the sidebar menu. Click Add to provision a new Event Hub namespace, and then complete the wizard that comes next.
Once the Event Hub namespace has been created, highlight it by clicking and under General, select Event Hubs. Click Add Event Hub and then complete the wizard to create your Event Hub. Take note of the name of your event hub. This will be used when you configure the Azure Event Hub Stream plugin.
Once your Event Hub has been created, highlight it and then navigate to Shared Access Policies to set the permissions. Add a Shared Access Policy which has Send and Listen Claims.
Once the Shared Access Policy has been added, highlight it and then copy the Connection String-Primary Key. This will be used when you configure the Azure Event Hub Stream plugin in your Topology.
After you’ve completed your Azure Event Hub settings, next is to install and configure your plugins in your Reekoh Topology. For this demo, we’ll be using the Azure Event Hub Stream and HTTP Webhooks Connector plugins. You may refer to our Plugin and Topologies documents for more info on how to install and configure your plugins in Reekoh.
After you’ve installed and configured both plugins, you should be able to see them in your topology.
Next, you need to configure your device in SIGFOX. Login to SIGFOX Control Panel, and then navigate to Device Type. Select the device type you’d like to configure a callback.
Once you’re directed to your selected Device Type’s Information page, navigate to Callbacks > New > Microsoft Azure Event Hub.
On the Callback Configuration wizard, set the following fields:
- Connection String – Generated Primary Connection String Key upon configuration of your Shared Access Policy in your Azure Event Hub.
- URL – URL of your Azure Event Hub, and then add /messages. For example, https://demo1-azure.servicebus.windows.net/myevent/messages.
- Body – This should be any body that conforms to SIGFOX’ JSON templating engine. See example below:
Click OK and SIGFOX will start sending data to your Azure Event Hub every hour. To verify if data has been received, go to the Webhook URL you’ve provided upon configuration of your HTTP Webhooks Connector plugin, and then add ?inspect. For example, http://requestb.in/vwdf6ovw?inspect. You should be able to see the transmitted data under Raw Body.
For more info on how to customise your Reekoh topology, you can check out our Starter Guides in the Reekoh Help Center.