You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by walter franco <wf...@gmail.com> on 2020/12/10 02:47:38 UTC

How to disconnect rabbitmq in PublishAMQP

Hello,
I have a question and I need your help:

I have a project (PoC) using apache nifi with PublishAMQP processor,
writing messages in RabbitMQ, and I see that the connections stay ACTIVE
always, don´t disconnect never (only stop the PublishAMQP processor). The
RabbitMQ has limite of the connections, so I need that diconnect in X
seconds or minutes.

Is this possible disconnect? or How is it done to free the connections?

Thanks

Best regards,
Franco

Re: How to disconnect rabbitmq in PublishAMQP

Posted by walter franco <wf...@gmail.com>.
Thanks Peter for your response.

Best,
Franco


El jue., 10 de diciembre de 2020 12:11 p. m., Peter Turcsanyi <
turcsanyi@apache.org> escribió:

> Hi Franco,
>
> If I understand your use case correctly, you do not ingest data
> continuously and would like PublishAMQP to disconnect after an idle
> period (when there are no messages to send to RabbitMQ).
> PublishAMQP is rather optimized for continuous / frequent data load and
> for this reason it pools the connection(s) and only disconnects when it
> gets stopped. Configuring idle timeout is not possible currently.
> The processor holds 1 connection per concurrent task so you can minimize
> the open connections by setting Concurrent Tasks = 1 (default) on the
> processor.
>
> Best,
> Peter
>
> On Thu, Dec 10, 2020 at 3:48 AM walter franco <wf...@gmail.com>
> wrote:
>
>> Hello,
>> I have a question and I need your help:
>>
>> I have a project (PoC) using apache nifi with PublishAMQP processor,
>> writing messages in RabbitMQ, and I see that the connections stay ACTIVE
>> always, don´t disconnect never (only stop the PublishAMQP processor). The
>> RabbitMQ has limite of the connections, so I need that diconnect in X
>> seconds or minutes.
>>
>> Is this possible disconnect? or How is it done to free the connections?
>>
>> Thanks
>>
>> Best regards,
>> Franco
>>
>

Re: How to disconnect rabbitmq in PublishAMQP

Posted by Peter Turcsanyi <tu...@apache.org>.
Hi Franco,

If I understand your use case correctly, you do not ingest data
continuously and would like PublishAMQP to disconnect after an idle period
(when there are no messages to send to RabbitMQ).
PublishAMQP is rather optimized for continuous / frequent data load and for
this reason it pools the connection(s) and only disconnects when it gets
stopped. Configuring idle timeout is not possible currently.
The processor holds 1 connection per concurrent task so you can minimize
the open connections by setting Concurrent Tasks = 1 (default) on the
processor.

Best,
Peter

On Thu, Dec 10, 2020 at 3:48 AM walter franco <wf...@gmail.com> wrote:

> Hello,
> I have a question and I need your help:
>
> I have a project (PoC) using apache nifi with PublishAMQP processor,
> writing messages in RabbitMQ, and I see that the connections stay ACTIVE
> always, don´t disconnect never (only stop the PublishAMQP processor). The
> RabbitMQ has limite of the connections, so I need that diconnect in X
> seconds or minutes.
>
> Is this possible disconnect? or How is it done to free the connections?
>
> Thanks
>
> Best regards,
> Franco
>