Closed mariobittencourt closed 4 years ago
Hi Mario,
The Buffer API is described at: https://nodejs.org/api/buffer.html
If the data you're dealing with is text, you can call toString() on the Buffer object to decode the bytes from UTF-8 to a string.
If you're dealing with binary data, you can use the values() function to get an iterator that returns each byte, or you can use the .read*() methods to read the bytes as integers, etc.
Hi, thanks for the quick reply. I am reading from a stream created from a standard category projection, so I have individual streams called something-**** so it creates a $ce-something.
the eventType appears as '$>' and the data, after toString shows something like 2@something-45c343fc-4051-468c-baf3-eefe052595be
which is the order and stream name of the origin event.
I wonder if I am doing something wrong on this case. In this case, is there a way to navigate to the actual event content directly ?
Hi, @x-cubed nevermind. the settings resolve link tos was set to false. By setting to true I am receiving the original event as expected.
Hi, I am using this library to interface with the event store 5.0.8.
I am able to write to the streams and by checking in the web interface I can see the contents correctly, such as the event type and the data.
But when I subscribe, I see that some fields are returned as Buffer. Example of a console.log of one event retrieved shows
I could not find how to have access to the original value