question

Upvotes
Accepted
1 0 1 1

How to know the length of time a particular event spends in an event queue with statistics?

treprfarfa-apievent-queue
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
38.1k 71 35 53

From my checking, the time has also be reset when it is reused.

Therefore, it is reset before adding to the event queue.

Have you seen any unexpected behavior when using this method?

This is the only public method used to retrieve event age.


1585804369430.png (21.4 KiB)
1585804391482.png (18.7 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
38.1k 71 35 53

@hamza.khalid

You can call the Event::getEventAge() which returns time in milliseconds, elapsed since the event was created. To use this method, you need to set the enableOMMEventAge configuration parameter to true.


1584583896621.png (16.1 KiB)
1584583914759.png (57.7 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
7.6k 15 6 9

@hamza.khalid

If you wish to use getEventAge, please also note that using event.getEventAge() on a cloned event is not supported.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1 0 1 1

Hi,
@moragodkrit @jirapongse.phuriphanvichai
Thank you guys for your comment. I know about eventAge function, but, it gives you time elapsed since the event happened. I need the length of time for which the event is in the event queue. In the EventQueue with Statistics part of documentation it's written that this functionality can be used to retrieve the length of time the events have been queued.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea