CAMEL-7659 fixed the issue that camel-atom filter always returns the last consumed entry from feed more than once
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c0490006 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c0490006 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c0490006 Branch: refs/heads/camel-2.12.x Commit: c0490006f1a4a0d1fb41fe9fe5643385cbf7806b Parents: da0df82 Author: Willem Jiang <willem.ji...@gmail.com> Authored: Wed Aug 13 18:02:16 2014 +0800 Committer: Willem Jiang <willem.ji...@gmail.com> Committed: Wed Aug 13 22:16:36 2014 +0800 ---------------------------------------------------------------------- .../java/org/apache/camel/component/atom/UpdatedDateFilter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/c0490006/components/camel-atom/src/main/java/org/apache/camel/component/atom/UpdatedDateFilter.java ---------------------------------------------------------------------- diff --git a/components/camel-atom/src/main/java/org/apache/camel/component/atom/UpdatedDateFilter.java b/components/camel-atom/src/main/java/org/apache/camel/component/atom/UpdatedDateFilter.java index 8a78a1d..f5067a5 100644 --- a/components/camel-atom/src/main/java/org/apache/camel/component/atom/UpdatedDateFilter.java +++ b/components/camel-atom/src/main/java/org/apache/camel/component/atom/UpdatedDateFilter.java @@ -50,7 +50,8 @@ public class UpdatedDateFilter implements EntryFilter { return true; } if (lastUpdate != null) { - if (lastUpdate.after(updated)) { + // we need to skip the latest updated entry + if (lastUpdate.after(updated) || lastUpdate.equals(updated)) { LOG.debug("Entry is older than lastupdate=[{}], no valid entry=[{}]", lastUpdate, entry); return false; }