How to receive events from an Microsoft Azure Event Hub on a Raspberry Pi

I received a question on my “How to send events from a Raspberry Pi to Microsoft Azure Event Hub” post:

“I want to ask about do you know “how to receive events from azure event hub to raspberry pi””

After a little research I found an article outlining how to do so , via the AMQP protocol using Proton C.  However, I found myself wondering about the use case.

Typically, we are sending events from our IoT devices to some cloud application for analytics, machine learning, or the like.  Event Hubs are great for those high volume cases.

However, if you need it for a messaging scenario, queues or topics might be more appropriate, and they are directly supported by the Azure Python SDK.  In my own case, I elected to use a simple long-polling strategy to have my raspberry pi listen to my cloud app for instructions.

So, can it be done?  Yes, here’s how.  But it may not be the right tool.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s