RAMESH KUMAR S
RAMESH KUMAR S

Reputation: 1

Receive telmetry from IoT hub on Android with Event Hub .for particular Device in IOT HUB

On Xamarin Android, I am using Event Hub for receiving data from IoT Hub. How can we receive data from a particular device?

For example, if we have device001 and device002, I want to receive telemetry from IoT hub for only device001 and telemetry from IoT hub for only device002 using Event Hub, or is there any other way?

Upvotes: 0

Views: 197

Answers (2)

IoTKid
IoTKid

Reputation: 151

You should consider message routing capability of IoT Hub. There is a good discussion here

Which leads also to here (good discussion)

In any case, you could you Azure Functions to listen and filter messages, route to almost wherever you want. Azure Functions are serverless hence low cost coding service. It has quick integration capabilities through UI with click click but requires some coding knowledge.

Upvotes: 0

Mikhail Shilkov
Mikhail Shilkov

Reputation: 35134

Event hubs don't support filtering as for example Service Bus queues or subscriptions.

You can receive all the events of one given partition (using EventHubConsumerGroup.CreateReceiver). Further filtering to device level will have to happen in your code. If you have many devices per partition, you might want to have some intermediate service that filters events before they get to the mobile device (e.g. a web app with SignalR).

Upvotes: 1

Related Questions