Re: camel-solr, SSL, and SolrCloud

2014-06-27 Thread Claus Ibsen
Hi Thanks for the patch. Its a big file, so it may take a bit to get this "processed". On Fri, Jun 27, 2014 at 6:00 PM, Scott Stults wrote: > Well, evidently we didn't fork right, so I did a diff and sent it into > Jira. There was already an open issue for upgrading to SolrCloud so I > applied i

Camel Exception Processing onRedelivery

2014-06-27 Thread sandeepreddip
Hi, I' m trying to audit failures to a table in database on every *retry* caused by an exception. I have an exception handler that is invoked on exception (HttpOperationFailedException in my case). As expected, a retry is executed every 5 seconds, the * Exception from Exchange in the processor*

Re: Passing Headers to a Route Invoked via Proxy

2014-06-27 Thread edhansen42
That would certainly help get the header values I need into Bean A as shown below. Route A: from("direct:RouteA") .beanRef("beanA", "retrieve(${headers})") ; Bean A @Produce(uri = "direct:foobar") protected FooBarService fooBarService; public

Re: How to mock multiple components without mocking everything with "*" ?

2014-06-27 Thread Claus Ibsen
Hi You can use regular expression, so its something a like: return "(activemq.*|exec.*)" See bottom of this page http://camel.apache.org/intercept On Fri, Jun 27, 2014 at 8:16 PM, Steven Pomerville wrote: > Hi, > > I'm using the CamelTestSupport in camel version 2.13.1. > > I'd like to do

Re: Passing Headers to a Route Invoked via Proxy

2014-06-27 Thread edhansen42
I was able to accomplish the goal by using RoutePolicySupport. When an Exchange begins, I store the Exchange in a ThreadLocal variable on a singleton class, which is defined as a @Bean and injected where needed. Before I store the Exchange, I check to see if there is an existing one already in th

Re: ZookeeperRoutePolicy with multiple routes and different znodes- one always shuts down

2014-06-27 Thread Michael Moores
Thanks Scott, for the info. Indeed - it looks like I have run into CAMEL-7501. Only one election policy- so one route is actually causing another route to be shut down. On 6/27/14, 2:53 PM, "Scott Stults" wrote: >I was doing something similar, and what I noticed in JConsole was that >there

Re: ZookeeperRoutePolicy with multiple routes and different znodes- one always shuts down

2014-06-27 Thread Scott Stults
I was doing something similar, and what I noticed in JConsole was that there was only ever one zookeeper election route created even when I had multiple route policies. There are two similar Jira issues related to this: CAMEL-7501 and CAMEL-5627. They might be the source of your trouble. Hope that

Re: ZookeeperRoutePolicy with multiple routes and different znodes- one always shuts down

2014-06-27 Thread Michael Moores
I tried an experiment that seems to point to a race condition in the Camel ZooKeeper component. I initialized the routes with autoStart=false, then started each route manually. When I do this everything works fine - no immediate shutdown of one of the routes.. I think it might have something to do

ZookeeperRoutePolicy with multiple routes and different znodes- one always shuts down

2014-06-27 Thread Michael Moores
I have two routes that I integrated with ZooKeeperRoutePolicy to establish basic distributed route election. (Using camel 2.13.1) When used with one route instance, election/failover works fine. When I set up multiple routes with multiple instances of ZooKeeperRoutePolicy, one route almost alway

Synchronisation and Aggregator

2014-06-27 Thread Sven Bauhan
Hi, I want to use a Synchronisation in a route with an Aggregator. So I implemented the onCompletion() method of the Synchronisation to send a response that the message was received correctly. My problem is that the onCompletion() method is called for each message segment, not only for the las

How to mock multiple components without mocking everything with "*" ?

2014-06-27 Thread Steven Pomerville
Hi, I'm using the CamelTestSupport in camel version 2.13.1. I'd like to do something like this to mock out two different components: @Override public String isMockEndpoints() { return "activemq*|exec*"; } I can't just mock everything with "*" because I was getting errors from the activi

Re: How to control when Spring initializes the XML Camel routes?

2014-06-27 Thread Jeff Bischoff
So the key method that is not getting called when I manually do context.start() is: org.apache.camel.core.xml.AbstractCamelContextFactoryBean.setupRoutes() The comment: "Setup all the routes which must be done prior starting org.apache.camel.CamelContext." Okay, great I need that to happe

Re: What's the point of the OUT message on an Exchange?

2014-06-27 Thread Matt Sicker
Thank you, that actually helped quite a bit! I see that using the in message is just more convenient than copying headers all the time for an InOut chain. On 27 June 2014 00:44, Claus Ibsen wrote: > Hi > > See this FAQ > http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html > >

Re: camel-solr, SSL, and SolrCloud

2014-06-27 Thread Scott Stults
Well, evidently we didn't fork right, so I did a diff and sent it into Jira. There was already an open issue for upgrading to SolrCloud so I applied it to that: CAMEL-6827. --Scott On Tue, Jun 24, 2014 at 11:48 AM, Claus Ibsen wrote: > Hi > > Yeah log a JIRA about this enhancement, and then do

Re: camel-solr, SSL, and SolrCloud

2014-06-27 Thread Doug Turnbull
FYI, Scott attached our patch to this JIRA issue https://issues.apache.org/jira/browse/CAMEL-6827 Also enables https for Solr. We're really excited about helping a lot with the Solr plugin as we do a lot of integration work with Solr, so I'm sure we'll keep having contributions. -Doug Turnbull

Re: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-06-27 Thread sandeepreddip
Well, I always had the *Accept header on the GET* Request. Please refer to my previous posts on the topic. I tried it directly from the route and from a processor as below, but both fail on a GET: *HttpHeaders.ACCEPT ="Accept"* *From a Route* from("timer:foo?period=1000").setHeader(Exchange.

Re: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-06-27 Thread Willem Jiang
I just checked the code of camel-http and camel-http4, it is not possible the set the content-type header for the GET method. I suggest you to use the accept header instead. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.ite

Re: processing data based on the metadata in the file using apache camel

2014-06-27 Thread Knut-Håvard Aksnes
Probably the simplest solution is to write a small bean or processor, reading the in stream first calculating the target based on the first line then building up the 1000 line packets and sending them using the request or send methods of ProducerTemplate. This is most likely simpler and cleaner tha

Re: Http4 Set Header Content-Type not passing through to the HTTP Request

2014-06-27 Thread sandeepreddip
I read the discussion at stack flow and would like to know how a GET request would be processed without content-type header with JAX-RS According to RFC 2616 Fielding http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html The definiti

Re: camel-cxf proxy failed wsdl reading with local schemaLocations

2014-06-27 Thread Michael Täschner
Hi, could anybody give me a hint with this issue (using schemalocations with cxf:Endpoint) ? Thanks and Regards, Michael 2014-06-23 16:20 GMT+02:00 Michael Täschner : > Hi Camel-Riders, > > we are (still) using SMX4.5 (Camel 2.10.7) and are trying to proxy a > SOAP call to external URL (plus rea

Re: processing data based on the metadata in the file using apache camel

2014-06-27 Thread Knut-Håvard Aksnes
Alternatively the Routing slip could be skipped in favor of using Producer templates inside the Aggregator. -- View this message in context: http://camel.465427.n5.nabble.com/processing-data-based-on-the-metadata-in-the-file-using-apache-camel-tp5752593p5752949.html Sent from the Camel - Users

Re: processing data based on the metadata in the file using apache camel

2014-06-27 Thread Knut-Håvard Aksnes
To me this sounds like a combination of The EIPs *RoutingSlip* and *Composed Message Processor*. Composed Message Processor Where most of the work will be done by a custom Message *Aggregator*. The *Splitter *part of the Composed Message Processor needs to split line by line. The Aggregator needs t

Re: Camel-hbase : problem with qualifier "id"

2014-06-27 Thread Christian Müller
Checkout the unit test, if you want: https://git-wip-us.apache.org/repos/asf?p=camel.git;a=commit;h=5e97f9238fc292cc6fde3d75d8b98d4b26b7e66d Best, Christian - Software Integration Specialist Apache Member V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer Apach

Re: Camel-hbase : problem with qualifier "id"

2014-06-27 Thread Christian Müller
The "issue" in your route is: setHeader("CamelHBaseQualifier", simple("id", String.class)) try: setHeader("CamelHBaseQualifier", constant("id", String.class)) because: simple("id", String.class) is evaluated to the input message id as described at [1]. [1] http://camel.apache.org/simple.html Be

Object lookup using EntityManager.find in camel-jpa

2014-06-27 Thread Knut-Håvard Aksnes
To do object lookup in camel-jpa consumer I can find 3 options in the documentation: consumer.query, consumer.nativeQuery and consumer.namedQuery. What I am missing is an option to use EntityManager.find. The big advantage of find, at least when using Hibernate is that the the JPA caches will be

Re: Error on using camel cxf "No binding factory… http://schemas.xmlsoap.org/soap/ registered (but works in eclipse)

2014-06-27 Thread dermoritz
Thanks for quick reply. My main looks as follows: public static void main(final String... args) throws Exception { Injector i; if (args.length < 1 || Strings.isNullOrEmpty(args[0])) { i = Guice.createInjector(new CepModule()); } else { i = Guice.

Re: SMPP How to receive delivery receipt from smsc as producer?

2014-06-27 Thread baMufu
Who would u mind sharing your code on how u managed to get response from the SMSC. Below is my code. from("test-jms:queue:test.queue").process(new Processor() { public void process(Exchange e) { System.out.println("Received id for ex

Re: Error on using camel cxf "No binding factory… http://schemas.xmlsoap.org/soap/ registered (but works in eclipse)

2014-06-27 Thread Willem Jiang
I can see the cxf-rt-bindings-soap:jar. Now my question is how did you run this stand alone application? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On June 27,

Re: New to Camel and also needing to come up to speed on Java again

2014-06-27 Thread Preben.Asmussen
Hi Rick When you get the file as xml I usually prefer to transform the xml using xslt and then call cxf in PAYLOAD dataformat. You have to set up a cxf endpoint eg: http://tempuri.org/";> >From your route you