Hey Abdul,
The “Current queue age” value printed from the npeekq sample app is actually the time between the oldest and the newest events on the queue.
If you want to check if an event was more than 24 hours on a queue you can use a queue reader as described in the documentation - https://techcommunity.softwareag.com/ecosystem/documentation/onlinehelp/Rohan/num10-1/10-1_UM_webhelp/index.html#page/um-webhelp/co-queuebrowse_3.html. All you should do is take the time when the event was published and then check for how long it has been on the store, e.g. :
public void go(nConsumeEvent event) {
Timestamp timePublished = new Timestamp(event.getHeader().getTimestamp());
System.out.println("Consumed event "+event.getEventID() + "; Event was published : " + timePublished);
// compare the timePublished of the event with the current timestamp
}
Rado
#Integration-Server-and-ESB#webMethods#Universal-Messaging-Broker