How to clear my iothub partitions?

Sharon Nisha Thiruvarul Durai 0 Reputation points
2024-01-31T07:15:03.53+00:00

Hi all I have 30 devices that sent continuous data for 18 hours . The data didnt go through Iot hub. Iot hub is somehow buffering this data and sending it slowly which is why im not able to receive new data. Is there a way to clear the old data from iot hub? Or a way to clear the partitions? Thank you Best Regards, Sharon Nisha.

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

1 answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 35,951 Reputation points
    2024-01-31T10:13:38.32+00:00

    Sharon Nisha Thiruvarul Durai Greetings!

    To delete the old data from your IoT hub, you can set the data retention period in Azure portal.

    In the "Data Retention" blade, you can set the retention time for your data. You can choose to keep the data for a specific number of days or to delete it immediately. Once you have set the retention time, click on "Save" to apply the changes.

    User's image

    Regarding stopping the IoT hub from sending old data, you can stop the devices from sending data by turning them off, but the IoT hub will continue to receive and store the data until it is deleted. If you want to stop the IoT hub from receiving new data, you can disable the devices or remove them from the IoT hub.

    To restart the IoT hub, you can use the Azure portal or Azure CLI. Here are the steps to restart the IoT hub using Azure CLI:

    • Open the Azure CLI and log in to your Azure account.
    • Run the command "az iot hub show --name {your IoT hub name} --resource-group {your resource group name}" to get the IoT hub connection string.
    • Run the command "az iot hub restart --connection-string {your IoT hub connection string}" to restart the IoT hub.

    Note that restarting the IoT hub will not delete the old data. You will need to follow the steps above to delete the old data.

    Do let me know if that helps.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.