Hello @Viktor Ponomarov ,
welcome to this moderated Azure community forum.
Good question.
The IoT Hub does not have a 'pause' button for streaming data but it has a retention time for incoming messages:
So you can read historical data:
Specifies how long this IoT hub will maintain device-to-cloud events, between 1 and 7 days.
Read this section if you want to make use of this.
Notice this seems related to the default event-hub-compatible endpoint. You need to use separate consumer groups if you have multiple consumer services too .
Probably, you are using custom endpoints.
I was not able to find a reference that these support the retention too.
So probably you will lose some data if you are dropping and recreating the services...
What if you create new EventHubs and services busses next to the existing ones?
If this is done, you probably can create an endpoint for the new services first. Then in a separate step, you can have the existing routes pointing to the new endpoints.
I expect this will minimize the impact on dropping routed messages...
I recommend testing this first :-)
Keep in mind you have a maximum of 10 endpoint for a basic/standard IoT Hub.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.