question

Upvotes
Accepted
1 1 2 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 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
78.2k 246 52 72

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 512.0 KiB each and 1.0 MiB total.

Upvotes
78.2k 246 52 72

@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 512.0 KiB each and 1.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 512.0 KiB each and 1.0 MiB total.

Upvotes
1 1 2 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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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