You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Saravanakumar Selvaraj (JIRA)" <ji...@apache.org> on 2019/01/15 18:19:00 UTC

[jira] [Comment Edited] (CAMEL-13050) camel atom URL with query parameters

    [ https://issues.apache.org/jira/browse/CAMEL-13050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16743277#comment-16743277 ] 

Saravanakumar Selvaraj edited comment on CAMEL-13050 at 1/15/19 6:18 PM:
-------------------------------------------------------------------------

Hi Claus,

I am using splitEntries=true option. I was debugging the issue and noted below behavior of the camel-atom consumer.

The root cause of my issue is that, when using query parameters the HTTP server that generates atom feeds creates entries with future dated 'updated' timestamp values. This resets the atom listener last updated timestamp and never process any new entries as the latest processed entry is already future dated.

One of my future dated entry was,
{code:java}
<entry xmlns="http://www.w3.org/2005/Atom">
    <title type="text">Saravanakumar</title>
    <link href="http://example.com/" rel="related" />
    <updated>2019-01-31T00:00:00.000Z</updated>
    <id>abcd:xyz</id>
    <content type="text">Camel is awesome</content>
</entry>{code}
I was seeing logs like below in DEBUG mode for the unprocessed entries.
{quote}Entry is older than lastupdate=Fri Jan 31 05:30:00 IST 2019 updated Mon Dec 17 21:11:20 IST 2018
 Entry is older than lastupdate=Fri Jan 31 05:30:00 IST 2019 updated Fri Dec 21 22:08:36 IST 2018
 Entry is older than lastupdate=Fri Jan 31 05:30:00 IST 2019 updated Mon Dec 31 20:49:13 IST 2018
{quote}
To conclude, camel-atom expects following while using splitEntries=true.

1. camel-atom works based on 'updated' timestamp('published' if not available) and it is not expected to process future dated entries.
 2. It is expected each entry has different updated timestamp. camel-atom will not process all entries that has same updated timestamp. If more than one entry has same updated timestamp it process the first entry only.

Therefore, it is not the problem with camel-atom component but the problem is with the feed entries.

Thanks,
 Saravanakumar


was (Author: saravanakumar):
Hi Claus,

I am using splitEntries=true option. I was debugging the issue and noted below behavior of the camel-atom consumer.

The root cause of my issue is that, when using query parameters the HTTP server that generates atom feeds creates entries with future dated 'updated' timestamp values. This resets the atom listener last updated timestamp and never process any new entries as the latest processed entry is already future dated.

One of my future dated entry was,

{{<entry xmlns="http://www.w3.org/2005/Atom">}}
{{ <title type="text">Saravanakumar</title>}}
{{ <link href="http://example.com/" rel="related" />}}
{{ <updated>2019-01-31T00:00:00.000Z</updated>}}
{{ <id>abcd:xyz</id>}}
{{ <content type="text">Camel is awesome</content>}}
{{ </entry>}}

I was seeing logs like below in DEBUG mode for the unprocessed entries.
{quote}Entry is older than lastupdate=Fri Jan 31 05:30:00 IST 2019 updated Mon Dec 17 21:11:20 IST 2018
 Entry is older than lastupdate=Fri Jan 31 05:30:00 IST 2019 updated Fri Dec 21 22:08:36 IST 2018
 Entry is older than lastupdate=Fri Jan 31 05:30:00 IST 2019 updated Mon Dec 31 20:49:13 IST 2018
{quote}
To conclude, camel-atom expects following while using splitEntries=true.

1. camel-atom works based on 'updated' timestamp('published' if not available) and it is not expected to process future dated entries.
 2. It is expected each entry has different updated timestamp. camel-atom will not process all entries that has same updated timestamp. If more than one entry has same updated timestamp it process the first entry only.

Therefore, it is not the problem with camel-atom component but the problem is with the feed entries.

Thanks,
 Saravanakumar

> camel atom URL with query parameters
> ------------------------------------
>
>                 Key: CAMEL-13050
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13050
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-atom
>    Affects Versions: 2.23.0
>            Reporter: Saravanakumar Selvaraj
>            Priority: Minor
>
> We are using camel-atom component to poll an atom REST API. The REST URL has a query parameter. This is not working.
> For example,adding a query parameter for below consumer endpoint stops polling for feeds.
> {{atom://https://example.com/API/feed?param=value}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)