Hi

I think we fixed a bug in that delay stuff. Can you try with latest release?

On Mon, Sep 21, 2015 at 2:46 PM, peter_ce <p....@cenit.de> wrote:
> Hi
>
> my custom component won't change the delay for the polling events. The
> consumer inherits from ScheduledPollConsumer and sets the delay with
> setDelay().
> Once Camel
> (org.apache.camel.impl.EventDrivenConsumerRoute.addServices(List<Service>))
> creates it, the delay will be set back to default (500ms). Looks like some
> weird magic which i can't grasp.
>
> My class looks like this:
>
> import org.apache.camel.Exchange;
> import org.apache.camel.Processor;
> import org.apache.camel.impl.ScheduledPollConsumer;
>
> public class PollTestConsumer extends ScheduledPollConsumer {
>
>         private final PollTestConsumerConfiguration configuration;
>
>         public PollTestConsumer(final PollTestEndpoint endpoint, final 
> Processor
> processor) {
>                 super(endpoint, processor);
>                 this.configuration = endpoint.getConsumerConfig();
>
>                 setDelay(7500);
>         }
>
>         @Override
>         protected int poll() throws Exception {
>                 Exchange exchange = getEndpoint().createExchange();
>                 processExchange(exchange);
>
>                 return 1;
>         }
>
>         private void processExchange(final Exchange exchange) throws 
> Exception {
>                 try {
>                         getProcessor().process(exchange);
>                 }
>                 catch (Exception e) {
>                         throw e;
>                 }
>         }
> }
>
> I wonder if my usage is wrong.
>
> The setup is Karaf 3.0.4 and Camel 2.15.2.
> I updated recently from Karaf 2.3.2 and Camel 2.11.1. With this setup it
> worked well.
>
>
> Thanks
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/custom-consumer-doesn-t-change-the-delay-tp5771708.html
> Sent from the Camel Development mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition:
https://www.manning.com/books/camel-in-action-second-edition

Reply via email to