camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simeon667 <>
Subject Simple
Date Fri, 29 Oct 2010 18:15:22 GMT

Hi there,

I seem to have some basic understanding problem of Simple evaluations and it
looks like I'm done searching the official docs without any success. Help


1 from("timer://twoSecTimer?fixedRate=true&period=60000")
2                .to("sql:select * from messages?dataSourceRef=myDS")
3                .split(body())
4                .to("log:org.apache.camel?level=DEBUG")
5                .setHeader("partnerName",
new PartnerStatusAggregationStrategy())
7                .to("log:org.apache.camel?level=DEBUG");

The query results in an Exchange like this:

Exchange[BodyType:java.util.LinkedHashMap, Body:{id=0, sender=Sting,
severity=0, message=Desert Rose, received=2010-10-29 13:08:14.0}]

1. Question: Why does line 5 result in ExpressionIllegalSyntaxException:
Illegal syntax: body[name]. The body is a map, so why can't I lookup a value
by [key]?

2. Question: Why doesn't the Simple expression in line 6
(...{partnerName}...) get substituted. No matter if I prepend a $ - it
doesn't. I did fix the issue from Question 1 by putting a constant as a
header value - no success ...

Thanks in advance!


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message