Re: Can I write a route that reads an arbitrary database table and stores it in a file?

2014-01-03 Thread James Carman
It's possible, but probably not advisable. :) from("cxf:bean:foo").process(new Processor() { @Override public void process(Exchange exchange) throws Exception { // Query the database and build up the JSONifiable data structure here...

Can I write a route that reads an arbitrary database table and stores it in a file?

2014-01-03 Thread Lothar Werzinger
Hi, I have the requirement to write a route that listens on a web service endpoint and that is supposed to read a database table where the connection information (host, port, ...) and the table name are passed in via the web service call, convert the table data to JSON and write it to a file. Is

Re: Need for XA?

2014-01-03 Thread Larry Meadors
Just to be clear here...if you're doing this: - get a message from JMS broker A - write to database - put a messages in a queue on JMS broker A Should you or should you not need XA? Larry

Alternative to a Streaming ResultSet

2014-01-03 Thread Christopher Gardner
Can the SQL component be streamed without the whole result set brought into memory? What about the jdbc component?

Re: Request for a project to upload for Rest Webservices

2014-01-03 Thread Christian Müller
Did you checked our examples [1]? You can find the source code at [2]. [1] http://camel.apache.org/examples.html [2] https://git-wip-us.apache.org/repos/asf?p=camel.git;a=tree;f=examples;h=7bcd07be46cce0eecc614a3438489b0c6478283a;hb=HEAD Best, Christian - Software Integration Sp

Re: Using the x509HostnameVerifier option in http4

2014-01-03 Thread Christian Müller
Which version of Camel do you use? Do you use multiple http endpoints? Best, Christian - Software Integration Specialist Apache Member V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer Apache Incubator PMC Member https://www.linkedin.com/pub/christian-mueller

Re: Message properties missing after Camel - rabbitmq routing

2014-01-03 Thread muthukumara...@gmail.com
Thanks Willem & Kraythe for your reply -- View this message in context: http://camel.465427.n5.nabble.com/Message-properties-missing-after-Camel-rabbitmq-routing-tp5745254p5745507.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Need for XA?

2014-01-03 Thread kraythe .
XA transactions are usually only needed if you have multisystem transactions to be coordinated. So if you read from a JMS queue and because of that store a message in a database then send a message on to another queue, you want both the DB and the JMS to roll back if there is a 500 error calling a

Re: ActiveMQ consumer remains after shutdown

2014-01-03 Thread Muhammad Ichsan
My question is: is it true that CachingConnectionFactory causes problem in Camel OSGi environment? On Jan 3, 2014 7:21 PM, "Claus Ibsen" wrote: > On Fri, Jan 3, 2014 at 1:18 PM, Muhammad Ichsan wrote: > > I'm using org.springframework.jms.connection.CachingConnectionFactory > > instead of org.ap

Streaming ResultSet Revisted

2014-01-03 Thread Christopher Gardner
Here: http://camel.465427.n5.nabble.com/streaming-of-an-sql-resultset-td5547603.html Claus recommends using "... a custom expression that returns an Iterator, the the splitter will use the iterator to read in a one row at a time." I'm using groovy to do something like this. Instead of a custom

Camel RemoteFilePollingConsumerPollStrategy and retry

2014-01-03 Thread geppo
Hi, I'm extending the GenericFileConsumer and setting the Poll Strategy to RemoteFilePollingConsumerPollStrategy. At the moment if there is an error when the pollDirectory method is called the polling is executed again, and again, and again,... [WARN] RemoteFilePollingConsumerPollStrategy : Trying

Re: Master Slave Camel-ActiveMQ

2014-01-03 Thread Bilgin Ibryam
I couldn't resist and summarized different ways for achieving master slave configurations in a blog post here http://www.ofbizian.com/2014/01/masterslave-failover-for-camel-routes.html Cheers, On 3 January 2014 02:17, Willem Jiang wrote: > There is one shortcoming of the Zookeeper policy, t

Re: How to read aggregation from HawtDB when Camel cannot read it by index

2014-01-03 Thread Stephan Burkard
Thanks Claus I will check if our subscription is eligible to get hawt-db-support. It does not need to be a hammer. I guess a screwdriver would be sufficient :-) Regards Stephan On Fri, Jan 3, 2014 at 1:01 PM, Claus Ibsen wrote: > camel-hawtdb is deprecated as posted on > http://camel.apache

Re: Question about using message headers/Exchange properties and route testing

2014-01-03 Thread Stephan Burkard
Thank you very much Claus, great hints! I found the ExchangeBuilder in Camel 2.11 and later, so it is not available in my version, but I have to keep that in mind. However, I found a CamelTestSupport.createExchangeWithBody() method that seems to create an Exchange from my body object. Then I coul

Re: Question about using message headers/Exchange properties and route testing

2014-01-03 Thread Henryk Konsek
> There is also an ExchangeBuilder AFAIR that you may use as well. Then > you can use that to create an exchange, to send with the produce > template. ExchangeBuilder is cool indeed, I forgot about it. :) BTW Probably having bean mocking API similar to the one presented below would be a nice addi

Re: ActiveMQ consumer remains after shutdown

2014-01-03 Thread Claus Ibsen
On Fri, Jan 3, 2014 at 1:18 PM, Muhammad Ichsan wrote: > I'm using org.springframework.jms.connection.CachingConnectionFactory > instead of org.apache.activemq.pool.PooledConnectionFactory. Is that > problem? > If you are using blueprint, then yeah you need to call its start|stop method also - th

Re: Asynchronous processing of routes

2014-01-03 Thread Henryk Konsek
Hi Yash, Solution to your problem is probably easier than you think. Using aggregator [1] EIP should solve your issue. from("jms:Q1").bean(SomeProcessorBean.class).to("jms:Q2"); from("Q2"). aggregate().constant(true).completionPredicate(body().isEqualTo("M2")).groupExchanges(). to("Q3"); Ag

Re: ActiveMQ consumer remains after shutdown

2014-01-03 Thread Muhammad Ichsan
I'm using org.springframework.jms.connection.CachingConnectionFactory instead of org.apache.activemq.pool.PooledConnectionFactory. Is that problem? While using org.apache.activemq.pool.PooledConnectionFactory with proper start and stop (init-method="start" destroy-method="stop"), I have no problem

Re: Message properties missing after Camel - rabbitmq routing

2014-01-03 Thread Willem.Jiang
The correlation_id and reply_to header are removed in You can find more information about the rabbitmq.* header here[1] [1]https://github.com/apache/camel/blob/master/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConstants.java -- View this message in co

Re: How to read aggregation from HawtDB when Camel cannot read it by index

2014-01-03 Thread Claus Ibsen
camel-hawtdb is deprecated as posted on http://camel.apache.org/hawtdb hawtdb is though an open source project so you can dive into the source code, and help that project. But as said hawtdb project is also considered deprecated, as its better to use the more stable and wide in use leveldb instead

Re: Question about using message headers/Exchange properties and route testing

2014-01-03 Thread Claus Ibsen
Just use the send/request method that takes a processor, and then use an inlined processor to set the headers/properties/body on the exchange in message. There is also an ExchangeBuilder AFAIR that you may use as well. Then you can use that to create an exchange, to send with the produce template.

Re: How to read aggregation from HawtDB when Camel cannot read it by index

2014-01-03 Thread Stephan Burkard
I know it is somehow the wrong place, but the HawtDB Google group seems to be dead (at least my posted question never appeared). Is there anybody who has written or commited to the hawtdb component of Camel I can ask? Thanks Stephan On Fri, Dec 20, 2013 at 10:51 AM, Stephan Burkard wrote: > H

Re: Question about using message headers/Exchange properties and route testing

2014-01-03 Thread Stephan Burkard
Hi Henryk > Are you sure? :) Exchange properties are propagated as well as > headers. Can you show me an example, where the properties are not > propagated down the route? Wow, I just realized that there are producer methods to send a body and a property. I never noticed them before because I alw

Re: set the value of camel body as value of constructor-arg

2014-01-03 Thread Claus Ibsen
On Fri, Jan 3, 2014 at 12:25 PM, Satyam Maloo wrote: > I have the following bean declaration in camel-context.xml > > > > You cannot do this, as is simple/blueprint and ${body} is Camel's expression language. Also when using is created once at startup. You may want to use a factory an

Re: ActiveMQ consumer remains after shutdown

2014-01-03 Thread Claus Ibsen
If you use a connection pool then make sure that this pool is also shutdown when you stop the bundle. eg usually that is to ensure the pool start|stop methods is invoked. See details at: http://camel.apache.org/activemq On Fri, Jan 3, 2014 at 12:07 PM, Muhammad Ichsan wrote: > I have routes def

Re: set the value of camel body as value of constructor-arg

2014-01-03 Thread Richard Kettelerij
Can you post your route? On Fri, Jan 3, 2014 at 12:25 PM, Satyam Maloo wrote: > I have the following bean declaration in camel-context.xml > > > > > The value of body is set dynamically in camel. From the logs I am able to > verify that the body is correct("Ambiguous data found for Test2

Re: Access another CamelContext

2014-01-03 Thread Richard Kettelerij
Thanks for the update. This might help other users. On Fri, Jan 3, 2014 at 10:58 AM, Hilderich wrote: > Hello *, > > I figured it out: > > In Apache Karaf I checked the service metadata via: > > > > The following output gave me a view to the server metadata > and I saw the key *camel.context.na

set the value of camel body as value of constructor-arg

2014-01-03 Thread Satyam Maloo
I have the following bean declaration in camel-context.xml The value of body is set dynamically in camel. From the logs I am able to verify that the body is correct("Ambiguous data found for Test2"), but the value passed to the bean is wrong(${body}). LOG: ... BodyType:String

ActiveMQ consumer remains after shutdown

2014-01-03 Thread Muhammad Ichsan
I have routes defined in an OSGi bundle. The routes use activemq component to process data. To be exact, I have camel listen into 3 different queue with concurrency = 10. As I started it in servicemix (apache-servicemix-4.4.0-fuse-00-27), I see in the Active MQ Web console that the queues are cons

Re: Access another CamelContext

2014-01-03 Thread Hilderich
Hello *, I figured it out: In Apache Karaf I checked the service metadata via: The following output gave me a view to the server metadata and I saw the key *camel.context.name* In my blueprint I was able to write the following: The crucial thing above is the filter attribute. That's it.

Re: Need for XA?

2014-01-03 Thread Henryk Konsek
Hi Tom, > In our application we have a lot of routes that follow the same pattern: > read a message, do some processing, update/insert in the database and then > send a message to the next route. > (...) > do we need XA transactions (...) ? That's right. You don't need XA to transactionally proce

Re: Access another CamelContext

2014-01-03 Thread Hilderich
Hello again, My approach above doesn't work steadily because more than one bundle exports a service with the same interface org.apache.camel.CamelContext. Now I have the situation that sometimes the Camel-Context is from that and then later the Camel-Context is from the other bundle. How can I use

Re: suspend and resume routes

2014-01-03 Thread frida
Yes! camelContext().getRouteStatus(id) returns Suspended as expected :) I've noticed the same behaviour with route.resume(); VS camelContext().resumeRoute(id); 2014/1/3 Claus Ibsen-2 [via Camel] > Hi > > Can you try using getRouteStatus from CamelContext. > > > http://camel.apache.org/maven

Re: Failed to create route

2014-01-03 Thread fkfausa
Thank's guy's. Your comments made me realize that i lacked beans. One of them was "required" that set up the transaction policy. -- View this message in context: http://camel.465427.n5.nabble.com/Failed-to-create-route-tp5745435p5745476.html Sent from the Camel - Users mailing list archive at

Re: suspend and resume routes

2014-01-03 Thread Claus Ibsen
Hi Can you try using getRouteStatus from CamelContext. http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/CamelContext.html#getRouteStatus(java.lang.String) On Thu, Jan 2, 2014 at 8:39 PM, frida wrote: > Hi Claus, > > to get the route status I'm just checking route.getSta

Re: unable to see all the palettes in Fuse

2014-01-03 Thread Claus Ibsen
Hi Please use the Fuse user forum for questions about Fuse IDE https://community.jboss.org/en/jbossfuse You can see a list of forums / irc / issue tracker for Fuse IDE here https://github.com/fusesource/fuseide On Fri, Jan 3, 2014 at 6:49 AM, maheshpvd wrote: > Hi, > > while creating camel-cont