My iothub built-in endpoint retention time is set for 1 day but the data has not been automatically deleted in months. The retention time cannot be changed, nor by the slider nor by typing a number. I followed the tutorials to read data from the endpoint using .net & java; My .net and java apps successfully read the built-in endpoint data sent by my Raspberry device to the iothub. The problem is that when the apps are launched, they first read all the 8k+ messages stored somewhere in the endpoint. My setup is for learning: a "pay-as-you-go" subscription with a free iothub tier. Earlier today I used all of my 8k message allowance when I ran the java app and all the messages were sent to a blob and then to my app (I believe that's what happened). After my allowance was reset, I deleted the blob containers from my storage, re-run the java app, still first received all the 8k+ messages before starting to receive the new Raspberry messages, but today's allowance was reduced only about 250 messages, just the messages sent during the test Thank you for your help.
Asked
Active
Viewed 470 times
1
-
The retention is a guarantee about the minimum time events are held. See [this Q & A](https://stackoverflow.com/questions/45590000/azure-iot-hub-event-endpoint-retention-time-not-working) – Peter Bons Apr 28 '18 at 04:56
-
You just try to read a Events/Messages only after the Current DateTimeUTC. So, you won't get them which is sent past! Ex: EventHubReceiver eventHubReceiver = eventHubClient.GetDefaultConsumerGroup().CreateReceiver(partition, DateTime.UtcNow.AddMinutes(-30)); – Vignesh May 03 '18 at 14:14