You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Ernst Bunders (JIRA)" <ji...@apache.org> on 2010/09/14 16:10:40 UTC

[jira] Created: (CAMEL-3125) When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.

When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.
----------------------------------------------------------------------------------------------------------------------

                 Key: CAMEL-3125
                 URL: https://issues.apache.org/activemq/browse/CAMEL-3125
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-rss
    Affects Versions: 2.4.0
         Environment: ubuntu 10.4
java 6
            Reporter: Ernst Bunders


The problem is with the default implementation of org.apache.camel.spi.PollingConsumerPollStrategy: org.apache.camel.impl.DefaultPollingConsumerPollStrategy
When an error occurs rollback() is called, and this method just logs the error and returns false, which means the polling will not be retried for that execution of the run() method. 
This means it will be retried after the delay.

I created an implementation that suspends the Consumer, which seems like acceptable default behavior. It also allows for extension and adding some hooks for custom stuff. In order for that to be useful it should be made easier to set your own PollingConsumerPollStrategy implementation.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-3125) When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-3125:
-------------------------------

     Original Estimate:     (was: 1 hour)
    Remaining Estimate:     (was: 1 hour)

> When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3125
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3125
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-rss
>    Affects Versions: 2.4.0
>         Environment: ubuntu 10.4
> java 6
>            Reporter: Ernst Bunders
>         Attachments: LimitingPollingConsumerPollStrategy.java
>
>
> The problem is with the default implementation of org.apache.camel.spi.PollingConsumerPollStrategy: org.apache.camel.impl.DefaultPollingConsumerPollStrategy
> When an error occurs rollback() is called, and this method just logs the error and returns false, which means the polling will not be retried for that execution of the run() method. 
> This means it will be retried after the delay.
> I created an implementation that suspends the Consumer, which seems like acceptable default behavior. It also allows for extension and adding some hooks for custom stuff. In order for that to be useful it should be made easier to set your own PollingConsumerPollStrategy implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-3125) When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-3125.
--------------------------------

    Fix Version/s: 2.5.0
       Resolution: Fixed

trunk: 998065.

There is now a {{LimitedPollingConsumerPollStrategy}} which is stateful and supports multiple consumers, so you can use it for multiple routes.
It will reset if a consumer is being suspended, so when you manually start the consumer its been reset.

There is a limit option you can set, its by default 3.

> When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3125
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3125
>             Project: Apache Camel
>          Issue Type: Wish
>          Components: camel-rss
>    Affects Versions: 2.4.0
>         Environment: ubuntu 10.4
> java 6
>            Reporter: Ernst Bunders
>            Assignee: Claus Ibsen
>             Fix For: 2.5.0
>
>         Attachments: LimitingPollingConsumerPollStrategy.java
>
>
> The problem is with the default implementation of org.apache.camel.spi.PollingConsumerPollStrategy: org.apache.camel.impl.DefaultPollingConsumerPollStrategy
> When an error occurs rollback() is called, and this method just logs the error and returns false, which means the polling will not be retried for that execution of the run() method. 
> This means it will be retried after the delay.
> I created an implementation that suspends the Consumer, which seems like acceptable default behavior. It also allows for extension and adding some hooks for custom stuff. In order for that to be useful it should be made easier to set your own PollingConsumerPollStrategy implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-3125) When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61960#action_61960 ] 

Claus Ibsen commented on CAMEL-3125:
------------------------------------

Read chapter 4 in the Camel in Action book which tells you background about error handling and where it _lives_ / _applies_.

The rule of thumb is the Camel error handling works with messages, eg when an Exchange has been created and handed from the component to Camel.
Before that its per component specific how they deal with their errors. That is component specific.

> When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3125
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3125
>             Project: Apache Camel
>          Issue Type: Wish
>          Components: camel-rss
>    Affects Versions: 2.4.0
>         Environment: ubuntu 10.4
> java 6
>            Reporter: Ernst Bunders
>            Assignee: Claus Ibsen
>             Fix For: 2.5.0
>
>         Attachments: LimitingPollingConsumerPollStrategy.java
>
>
> The problem is with the default implementation of org.apache.camel.spi.PollingConsumerPollStrategy: org.apache.camel.impl.DefaultPollingConsumerPollStrategy
> When an error occurs rollback() is called, and this method just logs the error and returns false, which means the polling will not be retried for that execution of the run() method. 
> This means it will be retried after the delay.
> I created an implementation that suspends the Consumer, which seems like acceptable default behavior. It also allows for extension and adding some hooks for custom stuff. In order for that to be useful it should be made easier to set your own PollingConsumerPollStrategy implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-3125) When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.

Posted by "Ernst Bunders (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ernst Bunders updated CAMEL-3125:
---------------------------------

    Attachment: LimitingPollingConsumerPollStrategy.java

This is my class that solves the problem

> When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3125
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3125
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-rss
>    Affects Versions: 2.4.0
>         Environment: ubuntu 10.4
> java 6
>            Reporter: Ernst Bunders
>         Attachments: LimitingPollingConsumerPollStrategy.java
>
>   Original Estimate: 1 hour
>  Remaining Estimate: 1 hour
>
> The problem is with the default implementation of org.apache.camel.spi.PollingConsumerPollStrategy: org.apache.camel.impl.DefaultPollingConsumerPollStrategy
> When an error occurs rollback() is called, and this method just logs the error and returns false, which means the polling will not be retried for that execution of the run() method. 
> This means it will be retried after the delay.
> I created an implementation that suspends the Consumer, which seems like acceptable default behavior. It also allows for extension and adding some hooks for custom stuff. In order for that to be useful it should be made easier to set your own PollingConsumerPollStrategy implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CAMEL-3125) When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-3125:
----------------------------------

    Assignee: Claus Ibsen

> When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3125
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3125
>             Project: Apache Camel
>          Issue Type: Wish
>          Components: camel-rss
>    Affects Versions: 2.4.0
>         Environment: ubuntu 10.4
> java 6
>            Reporter: Ernst Bunders
>            Assignee: Claus Ibsen
>         Attachments: LimitingPollingConsumerPollStrategy.java
>
>
> The problem is with the default implementation of org.apache.camel.spi.PollingConsumerPollStrategy: org.apache.camel.impl.DefaultPollingConsumerPollStrategy
> When an error occurs rollback() is called, and this method just logs the error and returns false, which means the polling will not be retried for that execution of the run() method. 
> This means it will be retried after the delay.
> I created an implementation that suspends the Consumer, which seems like acceptable default behavior. It also allows for extension and adding some hooks for custom stuff. In order for that to be useful it should be made easier to set your own PollingConsumerPollStrategy implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-3125) When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-3125:
-------------------------------

    Issue Type: Wish  (was: Bug)

> When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3125
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3125
>             Project: Apache Camel
>          Issue Type: Wish
>          Components: camel-rss
>    Affects Versions: 2.4.0
>         Environment: ubuntu 10.4
> java 6
>            Reporter: Ernst Bunders
>         Attachments: LimitingPollingConsumerPollStrategy.java
>
>
> The problem is with the default implementation of org.apache.camel.spi.PollingConsumerPollStrategy: org.apache.camel.impl.DefaultPollingConsumerPollStrategy
> When an error occurs rollback() is called, and this method just logs the error and returns false, which means the polling will not be retried for that execution of the run() method. 
> This means it will be retried after the delay.
> I created an implementation that suspends the Consumer, which seems like acceptable default behavior. It also allows for extension and adding some hooks for custom stuff. In order for that to be useful it should be made easier to set your own PollingConsumerPollStrategy implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-3125) When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.

Posted by "Ernst Bunders (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61959#action_61959 ] 

Ernst Bunders commented on CAMEL-3125:
--------------------------------------

I don't know much about the way Camel handles errors, but shouldn't this somehow tie into the error handling system?
I suppose some kind of notification/reporting/.. should be able to plug into the event of failing rss feed urls

regards,

Ernst

> When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3125
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3125
>             Project: Apache Camel
>          Issue Type: Wish
>          Components: camel-rss
>    Affects Versions: 2.4.0
>         Environment: ubuntu 10.4
> java 6
>            Reporter: Ernst Bunders
>            Assignee: Claus Ibsen
>             Fix For: 2.5.0
>
>         Attachments: LimitingPollingConsumerPollStrategy.java
>
>
> The problem is with the default implementation of org.apache.camel.spi.PollingConsumerPollStrategy: org.apache.camel.impl.DefaultPollingConsumerPollStrategy
> When an error occurs rollback() is called, and this method just logs the error and returns false, which means the polling will not be retried for that execution of the run() method. 
> This means it will be retried after the delay.
> I created an implementation that suspends the Consumer, which seems like acceptable default behavior. It also allows for extension and adding some hooks for custom stuff. In order for that to be useful it should be made easier to set your own PollingConsumerPollStrategy implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-3125) When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61890#action_61890 ] 

Claus Ibsen commented on CAMEL-3125:
------------------------------------

So you impl will invoke onError the first 2 times, and then the 3rd time it invokes onSuspend. Then when its in the future it will invoke onError.
The misses is never reset.

Also this is a stateful implementation which mean you should use a new instance on each different consumer.


> When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3125
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3125
>             Project: Apache Camel
>          Issue Type: Wish
>          Components: camel-rss
>    Affects Versions: 2.4.0
>         Environment: ubuntu 10.4
> java 6
>            Reporter: Ernst Bunders
>         Attachments: LimitingPollingConsumerPollStrategy.java
>
>
> The problem is with the default implementation of org.apache.camel.spi.PollingConsumerPollStrategy: org.apache.camel.impl.DefaultPollingConsumerPollStrategy
> When an error occurs rollback() is called, and this method just logs the error and returns false, which means the polling will not be retried for that execution of the run() method. 
> This means it will be retried after the delay.
> I created an implementation that suspends the Consumer, which seems like acceptable default behavior. It also allows for extension and adding some hooks for custom stuff. In order for that to be useful it should be made easier to set your own PollingConsumerPollStrategy implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-3125) When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61961#action_61961 ] 

Claus Ibsen commented on CAMEL-3125:
------------------------------------

And there is a ticket to consider some sort of feature in Camel to turn that component specific error into an Exchange and have that handled by the Camel error handler: CAMEL-1260

> When the fetching of a feed causes, polling continues endlessly, flooding the logs and creating unwanted network load.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3125
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3125
>             Project: Apache Camel
>          Issue Type: Wish
>          Components: camel-rss
>    Affects Versions: 2.4.0
>         Environment: ubuntu 10.4
> java 6
>            Reporter: Ernst Bunders
>            Assignee: Claus Ibsen
>             Fix For: 2.5.0
>
>         Attachments: LimitingPollingConsumerPollStrategy.java
>
>
> The problem is with the default implementation of org.apache.camel.spi.PollingConsumerPollStrategy: org.apache.camel.impl.DefaultPollingConsumerPollStrategy
> When an error occurs rollback() is called, and this method just logs the error and returns false, which means the polling will not be retried for that execution of the run() method. 
> This means it will be retried after the delay.
> I created an implementation that suspends the Consumer, which seems like acceptable default behavior. It also allows for extension and adding some hooks for custom stuff. In order for that to be useful it should be made easier to set your own PollingConsumerPollStrategy implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.