You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by saloni udani <sa...@gmail.com> on 2019/02/06 08:01:17 UTC

Re: NiFi 1.7.0: HandleHttpRequest duplicate request after timeout

Hi

I am facing same issue with apache NiFi 1.6.0 . When a post request to
HandleHttpRequest timeouts, it creates a new empty flow file and adds to
request queue.

Is there any solution or workaround?



Thanks

On Tue, Jul 10, 2018 at 3:46 AM Mike Stone <cr...@gmail.com> wrote:

> Hi,
> since the fix of "NIFI-4858" the timeout of the Http Request is set in the
> HTTP Context Map - before that it was set to Long.MAX_VALUE.
>
> I have now the issue, that the HandleHttpRequest duplicates the request,
> when the timeout is reached. Here is what I did:
>
> 1. Set the Request Expiration in the StandardHttpContextMap (1.7) Service
> to for example 3 minutes
> 2. Use that HTTP Context Map in the HandleHttpRequest (1.7) processor
> 3. Start a request and wait for the timeout
> 4. Just before the timeout there appears a new flowfile in the success
> queue.
> 5. In the NiFi log I can see that after 3 minutes the same request is
> added again to the Http Request Queue.
>
> Thanks for your help & greetings, Michael
>

Re: NiFi 1.7.0: HandleHttpRequest duplicate request after timeout

Posted by Sivaprasanna <si...@gmail.com>.
If you want to prevent the empty flowfile from getting processed in your
subsequent processors, you can connect HandleHttpRequest to
RouteOnAttribute and add one dynamic relationship which checks the size of
the FlowFile should be greater than ‘0’ and connect that relationship with
the subsequent processors and set the “unmatched” relationship of
RouteOnAttribute to auto-terminate.

-
Sivaprasanna

On Wed, 6 Feb 2019 at 1:31 PM, saloni udani <sa...@gmail.com>
wrote:

> Hi
>
> I am facing same issue with apache NiFi 1.6.0 . When a post request to
> HandleHttpRequest timeouts, it creates a new empty flow file and adds to
> request queue.
>
> Is there any solution or workaround?
>
>
>
> Thanks
>
> On Tue, Jul 10, 2018 at 3:46 AM Mike Stone <cr...@gmail.com> wrote:
>
>> Hi,
>> since the fix of "NIFI-4858" the timeout of the Http Request is set in
>> the HTTP Context Map - before that it was set to Long.MAX_VALUE.
>>
>> I have now the issue, that the HandleHttpRequest duplicates the request,
>> when the timeout is reached. Here is what I did:
>>
>> 1. Set the Request Expiration in the StandardHttpContextMap (1.7) Service
>> to for example 3 minutes
>> 2. Use that HTTP Context Map in the HandleHttpRequest (1.7) processor
>> 3. Start a request and wait for the timeout
>> 4. Just before the timeout there appears a new flowfile in the success
>> queue.
>> 5. In the NiFi log I can see that after 3 minutes the same request is
>> added again to the Http Request Queue.
>>
>> Thanks for your help & greetings, Michael
>>
>