Re: I cant throw the correct HTTP status codes from camel.

2014-10-29 Thread Dewitte P-Alban
Hi, Did you tried with exchange.getOut().setHeader( Exchange.HTTP_RESPONSE_CODE, new Integer(522)); Best regard Pierre-Alban DEWITTE @__pad__ On Wed, Oct 29, 2014 at 5:01 PM, Henryk Konsek wrote: > Hi, > > > from("direct:channel2").onException(Exception.class).process(new > > LogError(HubCon

Re: Camel rest-dsl sending 400(Client Error) Status code's

2014-10-29 Thread Dewitte P-Alban
Hi, I am assuming you are doing your check in a custom processor or something similiar. If you want to send your an HTTP Error code just add the header Exchange.HTTP_RESPONSE_CODE. For example : exchange.getIn().setHeader(Exchange.HTTP_RESPONSE_CODE, 204); Best regards Pierre-Alban DEWITTE @__p

Re: Zookeeper component RoutePolicy

2014-10-29 Thread Henryk Konsek
> What I want is to know if it is possible to when message 1 arrives > the consumer A consumes it, when message 2 arrives the consumer B consumes > it, when message 3 arrives the consumer A consumes it, and so on. What about load balancer [1] then? Laters! [1] http://camel.apache.org/load-balanc

Re: HTTP Basic Authentication

2014-10-29 Thread Willem Jiang
Please setup the option of httpClient.authenticationPreemptive to be true. You can find more information here[1] by searching authenticationPreemptive. [1]https://camel.apache.org/http -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http

Re: AutoMocking not working with Blueprint?

2014-10-29 Thread Willem Jiang
Which version of Camel are you using? I just run the test in camel master branch, all the tests passed. -- 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 October 3

Camel rest-dsl sending 400(Client Error) Status code's

2014-10-29 Thread leofprince
Hello Camel Users, I am developing REST services using camel REST-DSL[http://camel.apache.org/rest-dsl.html]component.I am successful in sending JSON request for happy path and get the response on the same using (Rest-DSL and camel servlet) combination. Now as we move forward the client

Re: camel-jms 2.14.0 option validation on startup from an expression

2014-10-29 Thread sandp
Hi, I'm using the recipientList to pass *timetoLive *option dynamically. The issue I'm facing is that the consumer does send a replyTo, if I use a recipientList . If I use a static URL, it sends back a replyTo the queue. How do I get around this? *The route below does not produce a replyTo* =

AutoMocking not working with Blueprint?

2014-10-29 Thread wjmcdonald
I get the following error in the testMockAllEndpoints test, but the other two work fine: java.lang.AssertionError: mock://seda:result Received message count. Expected: <1> but was: <0> at org.apache.camel.component.mock.MockEndpoint.fail(MockEndpoint.java:1318) at org.apache.camel.

Re: How to pick multiple file in same route

2014-10-29 Thread Christian Müller
http://camel.apache.org/aggregator2.html 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/11/551/642 On Wed, Oct 29, 2

Re: HTTP Basic Authentication

2014-10-29 Thread sharathbabuk
The preemptive authentication with HTTPS does not seem to work with "Camel-Http" It works only with "camel-http4" But I have a limitation on my container ( websphere application server 7.x ) so cannot use "camel-http4" - does anyone know if this should work with "camel-http" ?? == here is my cam

Aggregator race condition in recovery task?

2014-10-29 Thread Archis.Kulkarni
Hi, We’re using the camel 2.12.3 library for aggregation in one of our applications. The JdbcAggregationRepository is used to maintain the state. The aggregator is supposed to function based on time interval i.e. every ‘n’ ms it should send out the aggregated output. We’re seeing duplicate mess

Re: Aggregate up to N "ASAP"

2014-10-29 Thread bacar
Henryk, that sounds like a limitation in the design of aggregators in Camel, rather than a necessarily desirable end goal. -- View this message in context: http://camel.465427.n5.nabble.com/Aggregate-up-to-N-ASAP-tp5758134p5758312.html Sent from the Camel - Users mailing list archive at Nabble.

Re: Aggregate up to N "ASAP"

2014-10-29 Thread bacar
Thanks. I'm not sure on whether the current design of the aggregator actually allows for this though? I think the current design is "push" based: an upstream processor "pushes" exchanges into the aggregator; the aggregator's completion mechanism then decides whether to submit or not, yet. I think

Re: CircuitBreaker possible issue with async processor

2014-10-29 Thread Matteo Pavesi
I modified the issue, adding another problem that I discovered and that I believe my patch fixes. The second problem addressed is that, after the opening of the circuit, the RejectedExecutionException raised by the circuit breaker is set in the Exchange, but it doesn't return. This cause the proce

Re: Aggregate up to N "ASAP"

2014-10-29 Thread Henryk Konsek
> Any waiting is redundant here, and only wastes capacity. I'd find > it surprising if nobody else has a requirement to just process whatever has > arrived and not wait for any more. Time frames or message count (or the other predicate) are required to define "whatever" in "whatever has arrived" :

Re: I cant throw the correct HTTP status codes from camel.

2014-10-29 Thread Henryk Konsek
Hi, > from("direct:channel2").onException(Exception.class).process(new > LogError(HubConstants.CHANNEL2.getValue())).end().recipientList() > .method(Util.class, "getEndpoint"); Can you share the consumer part of the route with us? :) Cheers. -- Henryk Konsek http://henryk-kons

Re: Problems configuring FileIdempotentRepository

2014-10-29 Thread Henryk Konsek
> The underlying problem is that if the idempotent repository file doesn't > exist Camel doesn't seem to create it. If you can reproduce the issue with the Maven example, you could create a Jira issue with bug report. Cheers. -- Henryk Konsek http://henryk-konsek.blogspot.com

Re: Configuring a servlet with camel-jetty

2014-10-29 Thread Andrew Block
Jack, Have you added the handler to the Camel Registry with the name MyContextHandler? In your example, you are referencing the “MyContetHandler” in your route, but never show it being added to the Camel registry. - Andy --  Andrew Block On October 29, 2014 at 10:14:21 AM, jack atwork (jrmpa

Re: Configuring a servlet with camel-jetty

2014-10-29 Thread jack atwork
apologies, hit send by a bit early! Hi, I'm trying to configure a servlet using the camel-jetty component but I'm struggling and hoping somebody might be able to point out what I'm doing wrong. I expected to be able to register a new Handler and reference it in the endpoint uri. ServletContextH

Configuring a servlet with camel-jetty

2014-10-29 Thread jack atwork
Hi, I'm trying to configure a servlet using the camel-jetty component but I'm struggling and hoping somebody might be able to point out what I'm doing wrong. I expected to be able to register a new Handler and reference it in the endpoint uri . ServletContextHandler handler = new ServletContextH

Re: Camel use case with Akka

2014-10-29 Thread gmh
Great testimonials! However, I am trying to understand when it is appropriate to use Akka within the context of a Camel application? Maybe something along the line of the following: if your requirements are xyz then akka would/not be appropriate... Assuming large steaming data coming from 1 we

CXF Inteceptor Error handling with Camel-CXF, JMS and ActiveMQ

2014-10-29 Thread g8torPaul
I have an inbound CXF webservice that consumes a SOAP message off a JMS queue. The endpoint is configured via Camel Spring using the org.apache.cxf.transport.jms.JMSConfigFeature. The JMS Configuration is setup to consume off an ActiveMQ JMS queue and it is transactional. The CXF endpoint has a inb

Re: MQTT Request/Reply

2014-10-29 Thread Router
Thanks for your answer! Indeed, my concern to manage all exclusive topics might be a question for the ActiveMQ mailing list. I was hoping to get around exclusive topics sending the response directly after the camel route like in this description (didn't work for me): Reference: http://camel.4654

Camel rest-dsl sending 400 Status codes

2014-10-29 Thread leo prince
Hello Camel Users, I am developing REST services using camel REST-DSL[ http://camel.apache.org/rest-dsl.html]component.I am successful in sending JSON request for happy path and get the response on the same using (Rest-DSL and camel servlet) combination. Now as we move forward the clien

Re: MQTT Request/Reply

2014-10-29 Thread Henryk Konsek
Hi, > My current understanding is that every client must publish to a topic (e.g. > TargetTopic) configured in my broker. Yeah, I believe that exclusive reply topic is the best (only?) option for MQTT to achieve In/Out communication. > Due to the fact that I don't know how many clients will be t

CircuitBreaker possible issue with async processor

2014-10-29 Thread Matteo Pavesi
Hi all, I'm very keen to integrate the circuit breaker EIP in an application, but I noticed a misbehaviour when I use it with async processors, which is a common case. The problem is that the exception in the exchange seems to be populated after the "hasFailed" method invocation. To reproduce t

MQTT Request/Reply

2014-10-29 Thread Router
Hi, I'm trying to figure out the best practice for the communication between a client and a broker over mqtt. I assume n different clients sending data to my broker expecting to send a custom response for every received message in return. My current understanding is that every client must publish

How to pick multiple file in same route

2014-10-29 Thread dkum003
Hi, Currently we are picking one files and corresponding .md5 file from ftp/sftp server. The file name has some naming convention. For this we are using PollingConsumerPollStrategy and AntPathMatcherGenericFileFilter. Now I want to process multiple file based on some condition, what we have to

Re: Using named query parameters

2014-10-29 Thread Henryk Konsek
Hi, > I'm still not sure if the way I'm trying to access the java.util.Map > resultset with :#Position is the right way. It seems that nobody is using > this feature at all (at least I cannot find any other samples on the > internet). If it is documented, then it is supposed to work. :) If you ca

Bundle using camel-spring-ws failes to deploy in Karaf

2014-10-29 Thread rsteppac2
Hi all, I have a small test project that uses camel-spring-ws (2.14.0). It runs just fine in a Spring context and the WS client calls are acted on by my routes. Now I want to convert it to blueprints to deploy it in Karaf (3.0.2). However, the deployment of the bundle fails with: waiting for n

Re: Aggregate up to N "ASAP"

2014-10-29 Thread akoufoudakis
Then, you could try to write your own completionPredicate. Some additional info can be found here: http://camel.apache.org/aggregator2.html. -- View this message in context: http://camel.465427.n5.nabble.com/Aggregate-up-to-N-ASAP-tp5758134p5758290.html Sent from the Camel - Users mailing list

Re: Aggregate up to N "ASAP"

2014-10-29 Thread bacar
I understand how they work. These proposals don't resolve the problem. I only want to take /whatever is already available on the SEDA/. I recognize that this will take longer than 0ms, but the point is that I do not want to wait for /any more/ messages to arrive once I've grabbed whatever is availa

Re: Possible issue with FileLockExclusiveReadLockStrategy leaves orphaned .camelLock file.

2014-10-29 Thread Claus Ibsen
Hi Yeah good catch. You are welcome to log a JIRA ticket and work on a patch. http://camel.apache.org/contributing.html On Mon, Oct 27, 2014 at 11:23 PM, David R. Hoffman wrote: > I am trying to understand this block of code in the catch clause of the > FileLockExclusiveReadLockStrategy acquireE

I cant throw the correct HTTP status codes from camel.

2014-10-29 Thread Frankiboy
I cant throw the correct HTTP status codes from camel. I have a route like this: from("direct:channel2").onException(Exception.class).process(new LogError(HubConstants.CHANNEL2.getValue())).end().recipientList() .method(Util.class, "getEndpoint"); The endpoint is down, and i

Re: Quartz job data deletion in clustered quartz2

2014-10-29 Thread lakshmi.prashant
Hi Claus, Thanks a lot. Adding *managementNamePattern="#name#"* to in blueprint XML seems to click. This resolved the 2 issues with both re-deployment of the same bundle & also the load-balancing issue when the other VM's acquire the trigger & look up the camel context. We still have 1