How to list timers registered in timer service?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to list timers registered in timer service?

Lasse Nedergaard-2
Hi.

I have a case where I want to have one timer for each key. I can see my state is slowly growing for this operator and as my key is more or less constant so I want to investigate what happens.

I looked at state processor api but I can’t see any functionality to read the timers registered on timerservice and timer service don’t have a functionality to list registered timers.
Any idea how to read current registered timers.

Med venlig hilsen / Best regards
Lasse Nedergaard

Reply | Threaded
Open this post in threaded view
|

Re: How to list timers registered in timer service?

Seth Wiesman
Hi Lasse,

In the state processor api, KeyedStateReaderFunction#readKey has a parameter called `Context` which you can use to read the registered event time and proc time timers for a key.

Best,

Seth

On Fri, May 1, 2020 at 2:57 AM Lasse Nedergaard <[hidden email]> wrote:
Hi.

I have a case where I want to have one timer for each key. I can see my state is slowly growing for this operator and as my key is more or less constant so I want to investigate what happens.

I looked at state processor api but I can’t see any functionality to read the timers registered on timerservice and timer service don’t have a functionality to list registered timers.
Any idea how to read current registered timers.

Med venlig hilsen / Best regards
Lasse Nedergaard