Re: Camel Metrics

2016-09-18 Thread Willem Jiang
How about using the below code to look up the MetricsRegistry :)

context.getRegistry().lookupByNameAndType(“metricRegistry”, 
MetricRegistry.class);

--  
Willem Jiang


Blog: http://willemjiang.blogspot.com (English)  
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On September 7, 2016 at 5:01:35 AM, SaurabhNayar (nayar.saur...@gmail.com) 
wrote:
> I have incorporated Camel Statistics in my project. And they are awesome. I
> am trying to capture custom statistics for idempotent Consumer component
> like below: .to("metrics:timer:idempotentTimer?action=start")
> .idempotentConsumer(simple("${body.id}"), jdbcMessageIdRepository)
> .to("metrics:timer:idempotentTimer?action=stop")For some reason, I am not
> able to get the metrics idempotentTimer from the following code:
> MetricsRegistryService metricsRegistry =
> context.hasService(MetricsRegistryService.class); if(metricsRegistry
> != null) { return metricsRegistry.dumpStatisticsAsJson();
> }Or from MetricsMessageHistoryService metricsRegistry =
> context.hasService(MetricsMessageHistoryService.class);
> if(metricsRegistry != null) { return
> metricsRegistry.dumpStatisticsAsJson(); }Any ideas.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-Metrics-tp5787256.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.



Re: How to launch

2016-09-18 Thread Willem Jiang
Hi, 

If you just share one connection between the Scheduler Pooling consumers, it 
could be not effective, as the consumers have to be wait for the connection.
I think it could be reasonable to use the a pool to hold the connections for 
the consumers to share with.

--  
Willem Jiang


Blog: http://willemjiang.blogspot.com (English)  
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On September 15, 2016 at 1:54:17 PM, Corral A. (acorralor...@gmail.com) wrote:
> Hi,
>  
> I investigated and I would like to know how I sould do the next EIP
>  
> I have 20 scheduler task that launch a task, each with different data but
> using the same component. The component is a custom component that connects
> to a remote service to read data. I would like to instantiate only one
> component for this read tasks.
>  
> Example
>  
> schedule1->data1->readcomponent->persist
> schedule2->data2->readcomponent->persist
> schedule3->data3->readcomponent->persist
>  
> The readcomponent supports SchedulerPoooling but I don't want to use one
> instance by schedule because "readcomponent" is too heavy.
>  
> Is it correct if I develop "readcomponent" for using an external service
> (Spring @Service) that manages only one connection and do the heavy work.
>  
> Regards
> --
> Alberto
>  



Re: split, tokenize, unmarshal puts objects into ArrayList

2016-09-18 Thread fabryprog
Can we have an example?



--
View this message in context: 
http://camel.465427.n5.nabble.com/split-tokenize-unmarshal-puts-objects-into-ArrayList-tp5787509p5787694.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel in Action Book

2016-09-18 Thread Claus Ibsen
Hi

As others have said in this thread, then the source code for the Camel
in Action 1st edition has been updated to latest Camel releases up
till 2.15.6.

https://github.com/camelinaction/camelinaction

As we are working on the 2nd edition we decided to stop maintaining
the 1st ed source code after 5.5 years since the book was published.

Camel 2.x is the same basic principles, and what you learn in 1st
edition is good practice today.
So surely go ahead and read the 1st ed book.

If you buy the 2nd ed book from Manning you get the 1st ed for free (ebook).







On Sat, Sep 17, 2016 at 6:59 PM, medali_k  wrote:
> I am trying to learn Camel from the book 'Camel in Action'. The current
> edition of the book uses Camel 2.5 while Camel is now at version 2.17. I
> need help with these questions:
> 1/ Is there a big difference between the 2 versions?
> 2/ If I complete the book, what kind of other resources/subjects should I
> look at in order to update myself to the newer versions of Camel?
> Note that I don't have time to wait for the new edition of the book,
> apparently scheduled to be released in March 2017.
> Many thanks for helping!!
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-in-Action-Book-tp5787674.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2