Receiving device to cloud messages - Do I need to attach a storage account to my IOT Hub to use EventProcessorClient

SilverChips 71 Reputation points
2020-11-26T05:16:15.723+00:00

I am currently following the example here to receive the cloud messages. In that example I am using ReadEventsAsync.
The example however states that:

// The "ReadEventsAsync" method on the consumer is a good starting point for consuming events for prototypes
// and samples. For real-world production scenarios, it is strongly recommended that you consider using the
// "EventProcessorClient" from the "Azure.Messaging.EventHubs.Processor" package.

Now after looking at the EventProcessorClient here it seems like the EventProcessorClient requires the following

var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>";  
var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>";  

My question is do I need to attach an Azure Storage to the IOT Hub in order to use EventProcessorClient

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,143 questions
0 comments No comments
{count} votes

Accepted answer
  1. António Sérgio Azevedo 7,666 Reputation points Microsoft Employee
    2020-11-27T15:26:35.927+00:00

    Hello anonymous user ,
    For other's reference this is where you found the statement: https://github.com/Azure-Samples/azure-iot-samples-csharp/blob/master/iot-hub/Quickstarts/read-d2c-messages/ReadDeviceToCloudMessages.cs#L47

    My question is do I need to attach an Azure Storage to the IOT Hub in order to use EventProcessorClient

    The association of an Azure Storage account to your IoT Hub is only used when you want to Upload Files with IoTHub. You can nevertheless use the same Azure Storage Account both for your EventProcessorClient to persist checkpoints as blobs and for your IoT devices to upload the files to storage.

    Remember:

    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification.
    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful