Reposted from Geographic Information Systems Stack Exchange
"Expiring archived features in real time streaming using GeoEvent Processor"
"I am using ArcGIS 10.3 GeoEvent Extension Processor for real time streaming. The dataset in the GeoDatabase that is used for the streaming service is enabled for archiving but I want to be able to expire the features after a certain time so they are not clogging the table in the GeoDatabase. In the GeoEvent Manager, I have assigned the Output Connector as "Send Features to a Stream Service" and tried checking the "store latest" function while publishing a new service with a defined time of 1 minute for Features' maximum age, but it does not seem to get rid of the features after the assigned time." - Astha Karki (3/25/2015)
To ensure that your GeoEvent Stream Service deletes old features, there are three things you need to do to, in addition to checking Store Latest and specifying the Update Interval and Maximum Feature Age, when publishing the Stream Service:
The first two are easy to check. In the ArcGIS REST Services Directory open the page for your Stream Service. In the upper left corner click the JSON link to view a JSON representation of the Stream Service's properties. In the first "paragraph" of the JSON, look to see if "trackIdField" and "startTimeField" are defined as the expected event attribute fields from your GeoEvent Definition.
To check the third, in the ArcGIS REST Services Directory, open the page for the buddied Feature Service (should have the same basename as your Stream Service) and query the layer containing the features being retrained for the Stream Service. Copy / Paste the long integer representation of the date/time (the epoch milliseconds UTC) into a converter such as the Epoch and Unix Timestamp Conversion Tool and verify that the feature has the expected date/time value.
If you could, please test using the default update interval and maximum feature age values (10 seconds and 60 minutes). If it is still not working we may need to dig in further. It may be that your chosen flavor of RDBMS (Oracle, PostGRE, vs. Sql Server) is not accepting the query expression GeoEvent is creating.