You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/03/13 07:31:50 UTC
[camel] branch camel-2.x updated: CAMEL-13321:
camel-twitter-direct-message doesn't use default delay of 30s
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.x by this push:
new 12d3aad CAMEL-13321: camel-twitter-direct-message doesn't use default delay of 30s
12d3aad is described below
commit 12d3aad1385ae901c703dc05710df57598f6a3c6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 13 08:31:13 2019 +0100
CAMEL-13321: camel-twitter-direct-message doesn't use default delay of 30s
---
.../apache/camel/component/twitter/AbstractTwitterEndpoint.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/AbstractTwitterEndpoint.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/AbstractTwitterEndpoint.java
index 142478f..bbca443 100644
--- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/AbstractTwitterEndpoint.java
+++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/AbstractTwitterEndpoint.java
@@ -18,7 +18,6 @@ package org.apache.camel.component.twitter;
import org.apache.camel.Consumer;
import org.apache.camel.api.management.ManagedAttribute;
-import org.apache.camel.component.twitter.consumer.TwitterConsumerPolling;
import org.apache.camel.component.twitter.data.EndpointType;
import org.apache.camel.impl.DefaultPollingEndpoint;
import org.apache.camel.spi.UriParam;
@@ -28,15 +27,18 @@ import org.apache.camel.spi.UriParam;
*/
public abstract class AbstractTwitterEndpoint extends DefaultPollingEndpoint implements TwitterEndpoint {
- @UriParam(optionalPrefix = "consumer.", defaultValue = "" + TwitterConsumerPolling.DEFAULT_CONSUMER_DELAY, label = "consumer,scheduler",
+ public static final long DEFAULT_CONSUMER_DELAY = 30 * 1000L;
+
+ @UriParam(optionalPrefix = "consumer.", defaultValue = "" + DEFAULT_CONSUMER_DELAY, label = "consumer,scheduler",
description = "Milliseconds before the next poll.")
- private long delay = TwitterConsumerPolling.DEFAULT_CONSUMER_DELAY;
+ private long delay = DEFAULT_CONSUMER_DELAY;
@UriParam
private TwitterConfiguration properties;
public AbstractTwitterEndpoint(String uri, AbstractTwitterComponent component, TwitterConfiguration properties) {
super(uri, component);
+ setDelay(DEFAULT_CONSUMER_DELAY);
this.properties = properties;
}