cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

How to not lose data when adding stream entries rapidly

nmutter
14-Alexandrite

How to not lose data when adding stream entries rapidly

It's an old question but "In PostgreSQL and H2, stream entries are keyed by the unique key entries of the timestamp and source." - https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/Composer/DataStorage/Streams.html

If you use another persistence provide you seem to be out of luck "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." - same source

1 ACCEPTED SOLUTION

Accepted Solutions
nmutter
14-Alexandrite
(To:slangley)

Hey @slangley ,

yes, but only for "PostgreSQL and H2" referencing the docs. I did already mention it in the 'first' post. The thread was recreated as I added it to an older conversation.. But thank you for mentioning it again, better once to often.

 

I will close the thread with solution -> please check my initial post.

View solution in original post

4 REPLIES 4
PaiChung
22-Sapphire I
(To:nmutter)

Also entries must be 3 miliseconds or more apart I believe, not sure if this is outdated knowledge from my brain ...

nmutter
14-Alexandrite
(To:PaiChung)

Just got an Support Article update stating

"The minimal timestamp unit to differentiate Stream and Value Stream entries is 1 millisecond" - https://www.ptc.com/en/support/article/CS340193?source=subscription

So it seems you can discard this information you had from your brain Space for new facts! Yeah

slangley
23-Emerald II
(To:nmutter)

Hi @nmutter.

 

It's worth mentioning that source is also considered for determining whether the update is unique.

 

Regards.

 

--Sharon

nmutter
14-Alexandrite
(To:slangley)

Hey @slangley ,

yes, but only for "PostgreSQL and H2" referencing the docs. I did already mention it in the 'first' post. The thread was recreated as I added it to an older conversation.. But thank you for mentioning it again, better once to often.

 

I will close the thread with solution -> please check my initial post.

Top Tags