You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Markus Reil <gi...@gmx.de> on 2008/11/18 17:58:45 UTC

Delayer not working as expected.

Hi,

I am using camel 1.5.0 and my RouteBuilder is configured like this:

from(waitQueueName).delayer(header(HEADER_EXECUTION_TIME)).bean(routerBean).recipientList(header(HEADER_TARGET_ROUTE));

While the recipientList expression is working the header expression is
always ignored. I stepped through the code and saw that in
DelayerType.createAbsoluteTimeDelayExpression() "expr.getLanguage()" is
always null:

    private Expression createAbsoluteTimeDelayExpression(RouteContext
routeContext) {
        ExpressionType expr = getExpression();
        if (expr != null) {
            if (ObjectHelper.isNotNullAndNonEmpty(expr.getLanguage())) {
                return expr.createExpression(routeContext);
            }
        }
        return null;
    }

I have seen that this was changed in 1.5.0
(http://issues.apache.org/activemq/browse/CAMEL-811).

What do I have to do to to get this working? Thanks for any help.

Cheers,
Markus 
-- 
View this message in context: http://www.nabble.com/Delayer-not-working-as-expected.-tp20563685s22882p20563685.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Delayer not working as expected.

Posted by Jon Anstey <ja...@gmail.com>.
I've fixed this on the trunk and in the 1.5 fixes branch (will be available
in Camel 1.5.1). For the meantime though you can follow Claus's suggestion
of using a custom bean or processor that does the sleep instead.

On Wed, Nov 19, 2008 at 12:45 PM, Markus Reil <gi...@gmx.de> wrote:

>
> Issue created: https://issues.apache.org/activemq/browse/CAMEL-1103
> Thanks for your answers.
>
> Markus
>
> --
> View this message in context:
> http://www.nabble.com/Delayer-not-working-as-expected.-tp20563685s22882p20583263.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Jon

http://janstey.blogspot.com/

Re: Delayer not working as expected.

Posted by Markus Reil <gi...@gmx.de>.
Issue created: https://issues.apache.org/activemq/browse/CAMEL-1103
Thanks for your answers.

Markus

-- 
View this message in context: http://www.nabble.com/Delayer-not-working-as-expected.-tp20563685s22882p20583263.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Delayer not working as expected.

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Could you create a ticket in JIRA for this issue. Then we don't forget
to look into it. Also tickets created by end-users tend to have a
higher priority than you own minor stuff you have created with new and
good ideas ;)



/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/



On Tue, Nov 18, 2008 at 5:58 PM, Markus Reil <gi...@gmx.de> wrote:
>
> Hi,
>
> I am using camel 1.5.0 and my RouteBuilder is configured like this:
>
> from(waitQueueName).delayer(header(HEADER_EXECUTION_TIME)).bean(routerBean).recipientList(header(HEADER_TARGET_ROUTE));
>
> While the recipientList expression is working the header expression is
> always ignored. I stepped through the code and saw that in
> DelayerType.createAbsoluteTimeDelayExpression() "expr.getLanguage()" is
> always null:
>
>    private Expression createAbsoluteTimeDelayExpression(RouteContext
> routeContext) {
>        ExpressionType expr = getExpression();
>        if (expr != null) {
>            if (ObjectHelper.isNotNullAndNonEmpty(expr.getLanguage())) {
>                return expr.createExpression(routeContext);
>            }
>        }
>        return null;
>    }
>
> I have seen that this was changed in 1.5.0
> (http://issues.apache.org/activemq/browse/CAMEL-811).
>
> What do I have to do to to get this working? Thanks for any help.
>
> Cheers,
> Markus
> --
> View this message in context: http://www.nabble.com/Delayer-not-working-as-expected.-tp20563685s22882p20563685.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>

Re: Delayer not working as expected.

Posted by Hadrian Zbarcea <hz...@gmail.com>.
Hi Markus,

Thanks for pointing this out.  I will look into this today.

Hadrian

On Nov 18, 2008, at 11:58 AM, Markus Reil wrote:

>
> Hi,
>
> I am using camel 1.5.0 and my RouteBuilder is configured like this:
>
> from
> (waitQueueName
> ).delayer
> (header
> (HEADER_EXECUTION_TIME
> )).bean(routerBean).recipientList(header(HEADER_TARGET_ROUTE));
>
> While the recipientList expression is working the header expression is
> always ignored. I stepped through the code and saw that in
> DelayerType.createAbsoluteTimeDelayExpression() "expr.getLanguage()"  
> is
> always null:
>
>    private Expression createAbsoluteTimeDelayExpression(RouteContext
> routeContext) {
>        ExpressionType expr = getExpression();
>        if (expr != null) {
>            if  
> (ObjectHelper.isNotNullAndNonEmpty(expr.getLanguage())) {
>                return expr.createExpression(routeContext);
>            }
>        }
>        return null;
>    }
>
> I have seen that this was changed in 1.5.0
> (http://issues.apache.org/activemq/browse/CAMEL-811).
>
> What do I have to do to to get this working? Thanks for any help.
>
> Cheers,
> Markus
> -- 
> View this message in context: http://www.nabble.com/Delayer-not-working-as-expected.-tp20563685s22882p20563685.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>