You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/05/28 13:06:39 UTC

[camel] branch camel-2.x updated (b209274 -> 29c126f)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from b209274  [CAMEL-13376]camel-cxf - failure processor for custom exception handling cannot get the original message
     new 1cf1eb1  Update DefaultInflightRepository.java
     new 29c126f  Update MessageHistory.java

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 camel-core/src/main/java/org/apache/camel/MessageHistory.java      | 1 +
 .../main/java/org/apache/camel/impl/DefaultInflightRepository.java | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)


[camel] 02/02: Update MessageHistory.java

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 29c126fd31cf251128c245798740c2b3683ce37e
Author: bdevido <47...@users.noreply.github.com>
AuthorDate: Tue May 28 14:27:57 2019 +0200

    Update MessageHistory.java
    
    CAMEL-13587: Inflight repository browse should compute elapsed if the message is still inflight at a given node. Thanks to Barbara De Vido for reporting.
---
 camel-core/src/main/java/org/apache/camel/MessageHistory.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/camel-core/src/main/java/org/apache/camel/MessageHistory.java b/camel-core/src/main/java/org/apache/camel/MessageHistory.java
index 217b9d2..683c7f7 100644
--- a/camel-core/src/main/java/org/apache/camel/MessageHistory.java
+++ b/camel-core/src/main/java/org/apache/camel/MessageHistory.java
@@ -48,6 +48,7 @@ public interface MessageHistory {
 
     /**
      * Gets the elapsed time in millis processing the node took
+     * (this is 0 until the node processing is done)
      */
     long getElapsed();
 


[camel] 01/02: Update DefaultInflightRepository.java

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 1cf1eb1fe6c9449389fd3125931da334f62aff46
Author: bdevido <47...@users.noreply.github.com>
AuthorDate: Tue May 28 14:27:17 2019 +0200

    Update DefaultInflightRepository.java
    
    CAMEL-13587: Inflight repository browse should compute elapsed if the message is still inflight at a given node. Thanks to Barbara De Vido for reporting.
---
 .../main/java/org/apache/camel/impl/DefaultInflightRepository.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java
index 7f079ac..9052e65 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java
@@ -223,7 +223,12 @@ public class DefaultInflightRepository extends ServiceSupport implements Infligh
             // get latest entry
             MessageHistory history = list.getLast();
             if (history != null) {
-                return history.getElapsed();
+                long elapsed = history.getElapsed();
+                if (elapsed == 0 && history.getTime() > 0) {
+                    // still in progress, so lets compute it via the start time
+                    elapsed = System.currentTimeMillis() - history.getTime();
+                }
+                return elapsed;
             } else {
                 return 0;
             }