Reputation: 30906
In our architecture we made sure to encode all ids before they reach the user for security and other reasons.
When we started using stream we pushed non encoded ids to stream since we never thought they would become public.
However, upon using the get stream JS library to get real time notifications the data being sent back includes most of what was sent to stream from our backend.
So now we started the process of encoding the ids we push to stream but then we just realised we are going to loose the getActivities filtering options such as id_lte.
Is there any way to control which field get sent back to the front end instead of this dump of what is mostly backend data.
For us all we really need from the js realtime library is the live count and nothing else. We show that live count on a button and when the user presses the button then we fetch the data through our backend.
We have to go through our backend no matter what since we need the enrichment process and the sentence generation is also in the backend. We can't make use of the raw stream data so it's also a bandwitch waste.
Upvotes: 2
Views: 117
Reputation: 1521
Currently it is not possible to configure what data is send along with realtime updates. A solution could be to set up realtime webhooks or an sqs queue to push to your backend and handle the realtime connection to your clients yourself.
Regarding your issue with encoded or non-encoded ids, the ids stored on GetstreamIO activities are always UUID generated by our service, you can not override this value. Thus you can still use the id_lte
filter parameters.
Upvotes: 1