Support Questions

Find answers, ask questions, and share your expertise

Can a locally installed NiFi instance listen to a port on a remote server and receive real-time streaming data

avatar
Expert Contributor

Hi All,

May be this is a networking question and not specific to NiFi.

I've a locally installed NiFi instance on my laptop, we don't have NiFi installed on our Hadoop cluster yet.

On a remote server a TCP/IP port is setup, to receive real-time streaming data. Using NiFi's ListenTCP processor on my local machine, is it possible to listen to the port on the remote server and receive the real-time streaming data into my local NiFi instance.

Thanks.

1 ACCEPTED SOLUTION

avatar

Hi @Raj B

What's the nature of data source ? Do you need the data in NiFi only or in NiFi and in the remote streaming server ?

The ListenTCP processor listen to a particular port on the local host (not possible for remote host). This is the case of "Listen" processors in general. "Get" processors are used to get data from from remote systems.

To get this data into NiFi on your laptop I see mainly two choices:

  • Change the source behaviors to send the data to NiFi. If you need the data in the other server too, do an Y with NiFi and duplicate the flow. NiFi will forward data to the other server.
  • Put a NiFi on your other server and listenTCP will be able to get the data. You can then forward it to other NiFi servers with Remote Process Group as well as to the local machine on different port.

The first scenario is better if you can change the source.

View solution in original post

3 REPLIES 3

avatar

Hi @Raj B

What's the nature of data source ? Do you need the data in NiFi only or in NiFi and in the remote streaming server ?

The ListenTCP processor listen to a particular port on the local host (not possible for remote host). This is the case of "Listen" processors in general. "Get" processors are used to get data from from remote systems.

To get this data into NiFi on your laptop I see mainly two choices:

  • Change the source behaviors to send the data to NiFi. If you need the data in the other server too, do an Y with NiFi and duplicate the flow. NiFi will forward data to the other server.
  • Put a NiFi on your other server and listenTCP will be able to get the data. You can then forward it to other NiFi servers with Remote Process Group as well as to the local machine on different port.

The first scenario is better if you can change the source.

avatar
Contributor

Hi @Raj B

I believe that @Abdelkrim Hadjidj provided you with some good options. Your original question of: "is it possible to listen to the port on the remote server and receive the real-time streaming data into my local NiFi instance"

This is not possible in general, the way any networking software will work is you listen on and bind to a port on a local machine.

Thanks,

Andrew

avatar
Expert Contributor

Thanks guys for confirming what I was thinking (you can only listen to a port on your host machine).

@Abdelkrim Hadjidj The source data is streaming patient data in HL7 message format. Thanks for the 2 options.