You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by "Peter Wicks (pwicks)" <pw...@micron.com> on 2018/12/06 21:10:05 UTC

Something kind of like HandleHttpResponse/Request

I'd like to have a GET rest end point hosted in NiFi that returns the contents of a queued FlowFile.

Kind of like if HandleHttpRequest allowed input, and if there was an input, then when it received a GET request it wouldn't create a FlowFile, but instead return the content of the FlowFile.

My first thought was to use HandleHttpRequest -> Notify, and then a disconnected Wait -> HandleHttpResponse, but I don't see a way to get the attributes over to the response FlowFile so it knows which response to send it too.

Any ideas on how this type of interface could be setup?

Thanks,
  Peter


Re: Something kind of like HandleHttpResponse/Request

Posted by Bryan Bende <bb...@gmail.com>.
This is probably more complicated than what you are looking for, but
could you use HTTP site-to-site [1]?

You would send the flow files to an output port and they'd be sitting
there until something transferred them from the output port.

I'm not sure though if you can get only one flow file at a time. It is
based on creating a transaction, transferring a number of flow files,
and then committing the transaction.

[1] Data Transfer in REST API
https://nifi.apache.org/docs/nifi-docs/rest-api/index.html
On Thu, Dec 6, 2018 at 4:18 PM Peter Wicks (pwicks) <pw...@micron.com> wrote:
>
> I’d like to have a GET rest end point hosted in NiFi that returns the contents of a queued FlowFile.
>
>
>
> Kind of like if HandleHttpRequest allowed input, and if there was an input, then when it received a GET request it wouldn’t create a FlowFile, but instead return the content of the FlowFile.
>
>
>
> My first thought was to use HandleHttpRequest -> Notify, and then a disconnected Wait -> HandleHttpResponse, but I don’t see a way to get the attributes over to the response FlowFile so it knows which response to send it too.
>
>
>
> Any ideas on how this type of interface could be setup?
>
>
>
> Thanks,
>
>   Peter
>
>