Yeah, I have to agree with you all on this.

But is there any way we can just execute the function call without the
timer.at(). because if we are doing buffering from our end for async calls
there will be two points this buffering happens from our batch processor as
well as the library inbuilt batch processor both. If not then I think the
best way is to use the Batch processor from apisix as Nirojan does.

Regards
Ayesh

On Tue, Mar 31, 2020 at 12:59 PM Nirojan Selvanathan <[email protected]>
wrote:

> Hi,
>
> I created a PR to use the batch processor which executes only one-timer
> between the `buffer_duration`. I guess this can be used to resolve the
> problem.
>
> https://github.com/apache/incubator-apisix/pull/1358
>
>
> On Tue, Mar 31, 2020 at 12:10 PM Zexuan Luo <[email protected]>
> wrote:
>
> > I think the code is used to work around the 'cosocket API disabled'
> > limitation in log phase.
> > I agree with you that we should take care about the max of the timers.
> > Perhaps, we can buffer the data and use constant number of timer to flush
> > it?
> >
> > ~Jarvis.Qiu <[email protected]> 于2020年3月31日周二 下午6:00写道:
> >
> > > the code in:
> > >
> >
> https://github.com/apache/incubator-apisix/blob/master/lua/apisix/plugins/kafka-logger.lua#L101
> > >
> > > The limit of lua_max_pending_timers and lua_max_running_timers that may
> > be
> > > reached.
> >
>
>
> --
> Best Regards,
> S.Nirojan
>
> Research Engineer
> Linked-in: https://www.linkedin.com/in/niroselva/
> Mobile : (+94) 779823445 / 067763149095
>


-- 
*Software Engineer*
*Salzburg Research Forschungsgesellschaft *
*Salzburg, Austria*

Reply via email to