Ditto history: Getting events only from specific feature #2039
-
Hi everyone, I was following docs for history feature but didn't find anything about limiting what events to get (maybe this option was not implemented ?). I did some tryouts (Ditto 3.5.10) and so far the results are:
Am I doing something wrong or is it currently simply not possible to limit what history events will be streamed? By the way, for our use case It would be best to be able to limit also what part of the thing history is being stored (e.g. only subset of the features) to limit DB volume (we need to persist the events for 1 month). But if I get it right the main raison d`etre of the event journal is something internal to Ditto and not providing the events over the API. So the limitation (if implemented) would harm the Ditto functionality, right? Thank you in advance for any hints/replies. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thanks a lot for formulating your question so well 👍 What you describe should be possible with the added #1583 (search in history).
And with this only get events/changes back in which the Opening a SSE for a specific feature like you described is not yet supported - only the "Thing level" currently is. Same goes for the WebSocket - which should behave the same as SSE.
I am afraid that this is not possible with Ditto's "Event Sourcing" approach. |
Beta Was this translation helpful? Give feedback.
Hi @ondrej-charvat
Thanks a lot for formulating your question so well 👍
What you describe should be possible with the added #1583 (search in history).
So you should be able to e.g. open a SSE:
And with this only get events/changes back in which the
features/State
was modified.Opening a SSE for a specific feature like you described is not yet supported - only the "Thing level" currently is. Same goes for the WebSocket - which should behave the same as SSE.