i' am studing Flow but i don/t have example of real use now.. ok i can use some public api but i need some continous stream to try operator, zip, merge.. etc. How can use or find some data stream.. such as a socket?
t
Toby
12/06/2022, 3:59 AM
Why not start by building a data generator yourself?
For instance, you could write a microservice that polls the temperature of your region from an external service, but generates a continuous stream of events from it.
Toby
12/06/2022, 4:05 AM
I mean, this could be extremely simple, like:
Copy code
val sock = socket.accept()
while (socket has not closed) {
val t = getTemperatureFromServer()
writeToSocket(sock, newTempMessage(t))
}