1 Reply Latest reply on Jan 18, 2018 3:41 PM by mnudel RSS
    mnudel Apprentice

    Choosing the most appropriate data storage method

    Hello all,


    I'm implementing alarm handling mechanism which should closely resemble that of alerts (Alert History). However, I stumbled upon a problem associated with a stream. Say I have an array of certain entries which I have to put into a stream. If I loop through that list and run "AddStreamEntry" service with each iteration, in the end I'll see only a single (last) entry. I found an explanation to this in ThingWorx documentation - if a new record has the same timestamp as that of the previous (within 1ms) , the previous entry will be overwritten.



    The timestamp is a key field for streams. If you add an entry with the same timestamp, it will overwrite the previous timestamp (upsert). To avoid overwriting, specify milliseconds for the timestamp.


    Does it mean that if two alerts will get acknowledged within 1 ms only 1 record will be made in AlertHistory stream?