Closed ketangoyani closed 5 years ago
Hi @ketangoyani
Have you taken a look at Flume interceptors? There is one inbox as part of the Flume distribution that does something similar to what you want.
This interceptor inserts into the event headers, the time in millis at which it processes the event. This interceptor inserts a header with key timestamp (or as specified by the header property) whose value is the relevant timestamp. This interceptor can preserve an existing timestamp if it is already present in the configuration.
You can use a flume WebSocket source, the timestamp interceptor, and maybe a custom interceptor of your own to transform the data to your linking.
I'm hesitant to include this functionality in this project for three reasons:
I wanted timestamp of every event occurred in a JSON data that I am receiving. Like I am receiving JSON on every message is like {"type":"l2update","product_id":"BTC-USD","changes":[["sell","3867.79000000","1.61624"]]} so i wanted to add event time in JSON object like {"type":"l2update","product_id":"BTC-USD","eventtime":"2019-02-19T10:42:47.355Z","changes":[["sell","3867.79000000","1.61624"]]}