Thanks Garry for pointing this out and also sharing your solution. I opened a JIRA for it. Do you consider providing a patch for it? In this case, the pages [2] and [3] could be helpful for you.
[1] https://issues.apache.org/jira/browse/CAMEL-5126 [2] http://camel.apache.org/contributing.html [3] http://camel.apache.org/building.html Best, Christian On Wed, Mar 28, 2012 at 4:26 AM, garrydias <garryd...@gmail.com> wrote: > I found the problem. > > > It was caused by /garryHeader /header. It was null. > > > In fact, I was sending my body using ProducerTemplate.sendBody(Endpoint > endpoint, Object body). So /garryHeader /does not exist. I had to debug > org.apache.camel.processor.Throttler to discover that [1]. > > > I don´t think the throwing of *Caused by: java.lang.IllegalStateException: > The maximumRequestsPerPeriod must be a positive number, was: 0* is a good > behavior. Camel could at least throw a NPE or some kind of warning. As you > could see, find the real cause of the problem is not as obvious as it > should > be. > > > To permanently solve my IllegalStateException problem, I´m sending my body > using ProducerTemplate.sendBodyAndHeader(Endpoint endpoint, Object body, > Object headerKey, Object headerValue) method. > > > > [1] check the code bellow. If maximumRequestsPerPeriod is null the > exception > is thrown: > > > if (maximumRequestsPerPeriod <= 0) { > > throw new IllegalStateException("The maximumRequestsPerPeriod must > be a positive number, was: " + maximumRequestsPerPeriod); > > } > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Throttling-maximumRequestsPerPeriod-problem-tp5586898p5599362.html > Sent from the Camel - Users mailing list archive at Nabble.com. >