[
https://issues.apache.org/jira/browse/CAMEL-13587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16849601#comment-16849601
]
Barbara De Vido commented on CAMEL-13587:
-----------------------------------------
Hi,
I did this as workaround.
Implemented a custom infligth repository, that has the same logic of the
DefaultInflightRepository and then in the new inner class (the original cannot
be extended/overriden) InflightExchangeEntry I modified the code for
getElapsed() as follow
{code:java}
@Override
@SuppressWarnings("unchecked")
public long getElapsed() {
LinkedList<MessageHistory> list =
exchange.getProperty(Exchange.MESSAGE_HISTORY, LinkedList.class);
if (list == null || list.isEmpty()) {
return 0;
}
// get latest entry
MessageHistory history = list.getLast();
if (history != null) {
return System.currentTimeMillis() - history.getTime(); // MY
FIX!!!!!
} else {
return 0;
}
}
{code}
> InflightRepository, InflightEntry getElapsed is 0
> -------------------------------------------------
>
> Key: CAMEL-13587
> URL: https://issues.apache.org/jira/browse/CAMEL-13587
> Project: Camel
> Issue Type: Bug
> Components: came-core
> Affects Versions: 2.22.1
> Environment: Camel 2.22.1
>
> Reporter: Barbara De Vido
> Priority: Major
> Attachments: image-2019-05-27-17-04-12-319.png
>
>
> Hi,
> I made a camel-route that checks about inflight messages on other server
> through JMX connection.
> It was working fine in 2.17.x but now we upgrade to 2.22.1 and I always
> obtain a result of 0 millisecond for the elapsed field.
> I use the browse() operation of JMX bean. You can use jconsole to run a
> simple test.
> !image-2019-05-27-17-04-12-319.png!
> This is a major bug for us, since we use the code to monitoring production
> routes. Is there any workaround like get the echange historymessage from the
> exchage id?
> Thank you
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)