What's wrong in my REST paths?

2014-12-31 Thread Giorgio Vespucci
Hi all
This is my SO question about Rest paths:
http://stackoverflow.com/questions/27707664/whats-wrong-in-my-apache-camel-rest-paths

Many thanks for any hint
Happy 2014 ending! :)


RE: Camel SQS interface throw error with attributeNames as parameter

2014-12-31 Thread Morten Raahede Knudsen
Hi Neeraj

The value of the property attributeNames really refers to an object in the 
registry just like amazonSQSClient.

So you need to have something like:
registry.put(All, Collections.singletonList(All));

It may be less confusing if you renamed the value to something like 
attributeList:

registry.put(attributeList, Collections.singletonList(All));
aws-sqs://product-scraper-file-list?amazonSQSClient=%23amazonSQSClientattributeNames=attributeListdeleteAfterRead=falsemaxMessagesPerPoll=1visibilityTimeout=200

med venlig hilsen / Best regards,
Morten Knudsen

-Original Message-
From: neeraj [mailto:neerajkrchau...@yahoo.com] 
Sent: 23. december 2014 09:38
To: users@camel.apache.org
Subject: Camel SQS interface throw error with attributeNames as parameter

Trying to fetch message attributes, making use of URI below 
aws-sqs://product-file-list?amazonSQSClient=#amazonSQSClientdeleteAfterRead=falsemaxMessagesPerPoll=1visibilityTimeout=200

Getting exception as follows

org.apache.camel.FailedToCreateRouteException: Failed to create route
route1: Route(route1)[[From[aws-sqs://product-file-list?amaz... because of 
Failed to resolve endpoint:
aws-sqs://product-scraper-file-list?amazonSQSClient=%23amazonSQSClientattributeNames=AlldeleteAfterRead=falsemaxMessagesPerPoll=1visibilityTimeout=200
due to: Could not find a suitable setter for property: attributeNames as there 
isn't a setter method with same type: java.lang.String nor type conversion 
possible: No type converter available to convert from type:
java.lang.String to the required type: java.util.Collection with value All






--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-SQS-interface-throw-error-with-attributeNames-as-parameter-tp5761002.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: NPE with language:ruby and concurrentConsumers

2014-12-31 Thread Christian Mueller
Hi Christoph!

I raised the JIRA https://issues.apache.org/jira/browse/CAMEL-8201 and start
working on it.
I could successfully check, the issue is in Camel and not in JRuby. Add
yourself as watcher on the JIRA to keep you up to date...

Best,
Christian



--
View this message in context: 
http://camel.465427.n5.nabble.com/NPE-with-language-ruby-and-concurrentConsumers-tp5759703p5761196.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Rate limit producer to match consumer

2014-12-31 Thread Taariq Levack
I just fired up a sample app based on the file-size CBR I mentioned, hope I
didn't misunderstand or oversimplify so take a look if you haven't solved
it yet.
https://github.com/levackt/samples/tree/master/file-size-cbr

Also take a look at the route throttling example which shows off the
policies nicely.
http://camel.apache.org/route-throttling-example.html

Taariq



On Tue, Dec 30, 2014 at 8:32 PM, Taariq Levack taar...@gmail.com wrote:

 How about a content based router that checks the file size and forwards
 large messages to one endpoint and smaller ones to another?
 Both are throttled or limited appropriately, and forward to your existing
 endpoint where the work is done.

 That last endpoint should have more consumers than either of the others.
 You can get more creative with the general idea, like dynamically setting
 the maximumRequestsPerPeriod[1] higher for the small file endpoint when
 there are no large files to process.
 [1] http://camel.apache.org/throttler.html

 Taariq

  On 30 Dec 2014, at 13:41, Nathan Jones nat...@ncjones.com wrote:
 
  We are trying to improve the responsiveness of some bulk message
 processes such that a large batch does not flood a queue and prevent
 subsequent smaller batches getting through in a timely fashion. For
 example, a job to import millions of records from CSV may take an hour but
 a smaller job to import just one thousand records should be able to begin
 processing immediately in parallel instead of being sent to the back of a
 very long queue.
 
  This seems to me like the sort of thing Camel should be good at but I
 have so far not been about to see how this could be achieved. The idea we
 have in mind is to have a queue with limited size that will block when it
 is full so that the rate of queuing from a large batch would be limited to
 consumer capacity. Subsequent batches would have equal opportunity to get
 the next message on to the queue.
 
  At first I thought the Camel maxInflightExchanges property could be used
 for this but I don't think it has this affect. Is there a way a Camel route
 can inspect the size of the target queue to decide whether to suspend or
 resume?
 
  Perhaps a message broker can help solve this with either blocking queues
 or virtual aggregate queues but I haven't found these in RabbitMQ or
 ActiveMQ.
 
  Does anyone have any advice on a way solve this problem with Camel or
 otherwise?
 
  - Nathan



direct endpoint across camel context

2014-12-31 Thread leofprince
Dear Camel Users,

We have a couple of camel contexts and have a scenario where we need to
invoke a synchronous call to a route in different camel context. We have
used direct endpoint for synchronous call within same camel context ,we
would like to have same behavior for different camel contexts.

Just needed your advice on the same.

Thanks,
Leo. 



--
View this message in context: 
http://camel.465427.n5.nabble.com/direct-endpoint-across-camel-context-tp5761200.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: direct endpoint across camel context

2014-12-31 Thread Pontus Ullgren
I would suggest that you take a look at the direct-vm component.
http://camel.apache.org/direct-vm.html

Best regards
Pontus
On 31 Dec 2014 14:49, leofprince leofpri...@gmail.com wrote:

 Dear Camel Users,

 We have a couple of camel contexts and have a scenario where we need to
 invoke a synchronous call to a route in different camel context. We have
 used direct endpoint for synchronous call within same camel context ,we
 would like to have same behavior for different camel contexts.

 Just needed your advice on the same.

 Thanks,
 Leo.



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/direct-endpoint-across-camel-context-tp5761200.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: direct endpoint across camel context

2014-12-31 Thread François LIOT
Hi,

On a similar design, we leverage to workaround the same constrains using 
servlet/restlet bind point on remote instance.

Advantage : it covers header transmission questions, synchronously, in 
transnational mode, without use activemq or jms.

Disadvantage : it can create issues with processing timeouts... Where activemq 
or jms are wonderfully built for transnational workout.

Regards,

François Liot

 ​


From: leofprince leofpri...@gmail.com
Sent: Wednesday, December 31, 2014 2:49 PM
To: users@camel.apache.org
Subject: direct endpoint across camel context

Dear Camel Users,

We have a couple of camel contexts and have a scenario where we need to
invoke a synchronous call to a route in different camel context. We have
used direct endpoint for synchronous call within same camel context ,we
would like to have same behavior for different camel contexts.

Just needed your advice on the same.

Thanks,
Leo.



--
View this message in context: 
http://camel.465427.n5.nabble.com/direct-endpoint-across-camel-context-tp5761200.html
Sent from the Camel - Users mailing list archive at Nabble.com.