2

FLINK Stream API socketTextStream(hostname, port) method acts as Client. that is we need to send the continuous stream on the port and " socketTextStream (hostname, port)" method will read the incoming stream.

But my requirement is like, I want to use FLINK as a server and looking for an API that can listen from a port. Can any one has the FLINK stream API? that will solve my problem. Thanks in advance !!!

//

Eriko
  • 31
  • 4

1 Answers1

0

There's no support for this built into Flink, but if you really wanted to you could build a server into a flatmap operator, or a ProcessFunction, or implement a custom Sink.

However, this doesn't seem like a good way to build a robust system (it won't be easy to make this fault tolerant, or to manage redeployments without data loss). Why not stream the results from Flink into something like a Kafka topic, and attach the other clients there?

David Anderson
  • 39,434
  • 4
  • 33
  • 60