Re: Camel-JMS JMS Selector getting overridden by new requests

2015-12-08 Thread ravi.4indra
are the endpoints shared between multiple threads even if the bean is of
protoype scope?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-JMS-JMS-Selector-getting-overridden-by-new-requests-tp5774806p5774838.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel-JMS JMS Selector getting overridden by new requests

2015-12-07 Thread ravi.4indra
Hi 

We are having a issue where our Selector mesageid is being overidden by the
messageid from new requests. Its like endpoints are being cached and same
endpoints are being reused.

beanprocessor code

 @EndpointInject(uri = "bxJmscomponent:queueName")
JmsEndpoint endpointJMS;

@EndpointInject
ConsumerTemplate consumer;

 public void process(Exchange exchange){
//prepare JMS selector
String jmsselector = ""
//set selector
endpointJMS.setSelector(jmsselector);
//
  rspExchange = consumer.receiveNoWait(endpoint);
}


bean is of scope prototype a new bean will be created for every request. its
like endpoints are being cached somewhere and camel is returing the
endpoints from the cache instead of creating new.

Is there a option to tell camel to create a new endpoint for every request?

Thanks
Ravi



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-JMS-JMS-Selector-getting-overridden-by-new-requests-tp5774806.html
Sent from the Camel - Users mailing list archive at Nabble.com.


camel-JMS Component Responses from multiple queues

2015-10-20 Thread ravi.4indra
Hi,

I am looking for some suggestions on scenario where response to a request
sent to queue can come in any one of the three queues.

is there a way in camel to check for responses in multiple queues.

Thanks
ravi



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-JMS-Component-Responses-from-multiple-queues-tp5772877.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Warning Messages in Logs when camel application running on multiple nodes

2015-05-13 Thread ravi.4indra
Hi,

I have a route using camel file2 to move a file. its working fine with a
single node but with camel running on three different nodes i am seeing
below error on 2 nodes and successfully processing in the third server.

is there a configuration or option on camel to prevent this
warnings/exception in logs


org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
rename file: Generi 
   
cFile[filename] to: GenericF


ile[filename]
at
org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFil


e(GenericFileProcessStrategySupport.java:115)[camel-core-2.14.0.jar:2.14.0]
at
org.apache.camel.component.file.strategy.GenericFileDeleteProcessStrategy.begin(Gene


ricFileDeleteProcessStrategy.java:42)[camel-core-2.14.0.jar:2.14.0]
at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsu


mer.java:348)[camel-core-2.14.0.jar:2.14.0]
at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer


.java:211)[camel-core-2.14.0.jar:2.14.0]
at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:17


5)[camel-core-2.14.0.jar:2.14.0]
at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)[ca


mel-core-2.14.0.jar:2.14.0]
at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)[came


l-core-2.14.0.jar:2.14.0]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_45]
at
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)[:1.7.0_45]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Sche


duledThreadPoolExecutor.java:178)[:1.7.0_45]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledTh


readPoolExecutor.java:293)[:1.7.0_45]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7


.0_45]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7


.0_45]
at java.lang.Thread.run(Thread.java:744)[:1.7.0_45]


from(file://RemoteMountedDirectory?doneFileName=${file:name}.donedelay=10maxMessagesPerPoll=200delete=true)
 .to(file://toLocalDirectory+?doneFileName=${file:name}.done);

Thanks
Ravi



--
View this message in context: 
http://camel.465427.n5.nabble.com/Warning-Messages-in-Logs-when-camel-application-running-on-multiple-nodes-tp5767030.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Input directory with multiple file consumers

2015-01-29 Thread ravi.4indra
I ran into a similar issue and exploring options for this.
does reducing the delay between polls to very low value (10) increases with
file consumption on both the nodes?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Input-directory-with-multiple-file-consumers-tp5713788p5762241.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel is running only one route at a point of time

2015-01-28 Thread ravi.4indra
I have camel context with routes like this

from(file:dir1)
 //some processing
.to(file:dir2)

from(file:dir2)
 //some processing
.to(file:dir3)


from(file:dir3)
 //some processing
.to(file:dir4)


from(file:dir6)
 //some processing
.to(file:dir7)

we have a huge no of files going through the routes.
I am observing from my logs that.only one route is active at anypoint of
time 

example
only when files from dir1 to dir2(first route) are moved is done.
second route is getting active. is there anything special that i have to
configure to have them run independently.

Thanks
Ravi



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-is-running-only-one-route-at-a-point-of-time-tp5762194.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-cxf component is encoding(base64) by default

2014-06-15 Thread ravi.4indra
loos like it's the cxf behaviour to decode the base64. but I could not find
this in cxf docs.



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-cxf-component-is-encoding-base64-by-default-tp5750705p5752303.html
Sent from the Camel - Users mailing list archive at Nabble.com.


camel-cxf component is encoding(base64) by default

2014-04-29 Thread ravi.4indra
Hi ,

I am consuming the web service using the camel-cxf component. Below is how
the element defined in 
wsdl.

xs:element name=elementA
ns1:expectedContentTypes=application/octet-stream type=xs:base64Binary
xmlns:ns1=http://www.w3.org/2005/05/xmlmime/

javaCode:
element A is encoded base64 String 
DataHandler dataHandler = new DataHandler(elementA, text/plain);

I am observing that camel-cxf component is encoding the encoded base64
String in SOAP request. Is this the default behaviour of camel-cxf component 
? Is there a way I can stop camel-cxf from encoding as i want to pass in the
encoded Base64.

Any Help in Appreciated 

Thanks
Ravi



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-cxf-component-is-encoding-base64-by-default-tp5750705.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-cxf rs client bean

2014-04-01 Thread ravi.4indra
Hi,

This is how my route looks like

 from(direct:start).routeId(start)

.bean(Processor1.class, prepareRequestMessage)
.to(cxfrs:bean:rsClient?synchronous=true)
.bean(Processor1.class, processResponseMessage)

prepareRequestMessage method in class Processor1 is used to set headers 

   
exchange.getOut().setHeader(CxfConstants.CAMEL_CXF_RS_USING_HTTP_API,
Boolean.TRUE);
exchange.getOut().setHeader(Exchange.HTTP_METHOD, GET);
exchange.getOut().setHeader(QueryParam1, QueryParam1-value);
exchange.getOut().setHeader(QueryParam2, QueryParam2-value);

Below is the declaration for the bean rsClient
 cxf:rsClient id=rsClient
address=http://providerservices-sys3.regence.com/ProviderApi/api/Provider/


Any help is appreciated.

Thanks





--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-cxf-rs-client-bean-tp5749587p5749637.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-cxf rs client bean

2014-04-01 Thread ravi.4indra
Hi, 

This is how my route looks like 

 from(direct:start).routeId(start) 

.bean(Processor1.class, prepareRequestMessage) 
.to(cxfrs:bean:rsClient?synchronous=true) 
.bean(Processor1.class, processResponseMessage) 

prepareRequestMessage method in class Processor1 is used to set headers 

   
exchange.getOut().setHeader(CxfConstants.CAMEL_CXF_RS_USING_HTTP_API,
Boolean.TRUE); 
exchange.getOut().setHeader(Exchange.HTTP_METHOD, GET); 
exchange.getOut().setHeader(QueryParam1, QueryParam1-value); 
exchange.getOut().setHeader(QueryParam2, QueryParam2-value); 

Below is the declaration for the bean rsClient 
 cxf:rsClient id=rsClient address= REST ENdpoint/


Any help is appreciated. 

Thanks 




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-cxf-rs-client-bean-tp5749587p5749638.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel-cxf rs client bean

2014-03-31 Thread ravi.4indra
Hi,

I am having trouble defining a cxf rs client bean. can anyone point me the
example of defining a cxf client bean using the http client.

Any Help is appreciated 

Thanks
Ravi



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-cxf-rs-client-bean-tp5749587.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel-JmsComponent ThreadContext issues

2013-09-27 Thread ravi.4indra
Hi,

we set the ThreadContext value for every request coming in and we use that
value in logging.
when the message is picked up from the queue (which is done by
QueueReplyManager which runs in a different thread) the thread context value
in that thread(QueueReplyManager  thread) is remaining same for all the
requests which is the value from first request that system received. Not
sure why this is happening for Camel-jms component.

Any help is appreciated.

Thanks
Ravi




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-JmsComponent-ThreadContext-issues-tp5740277.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Issue with the request timeout in camel-jms component

2013-08-12 Thread ravi.4indra

Hi ,

It would be hlepful if anyone can provide update on the issue.


issue as described in jira

*When performing an InOut JMS exchange with a certain requestTimeout, if the
reply message
is received in time, but the following formula stands true: 

{{T0 + T1 = T!}}, where:

T0 = JMS response time
T1 = remaining route processing time following the reply
T! = requestTimeout

Then camel-jms will throw an {{ExchangeTimedOutException}} regardless of the
fact that the
reply was truly received in time.*


*Below is the Jira link*

http://mail-archives.apache.org/mod_mbox/camel-issues/201303.mbox/%3CJIRA.12635116.1362400893039.31620.1363911195905@arcas%3E
http://http://mail-archives.apache.org/mod_mbox/camel-issues/201303.mbox/%3CJIRA.12635116.1362400893039.31620.1363911195905@arcas%3E
  





Thanks
ravi



--
View this message in context: 
http://camel.465427.n5.nabble.com/Issue-with-the-request-timeout-in-camel-jms-component-tp5737180.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: CAMEL -JMS Request TimeOut

2012-11-02 Thread ravi.4indra
Thanks Willem!!

I am seeing this two threads even after getting response from reply queue.  
PersistentQueueReplyManager
JmsReplyManagerTimeoutChecker

I am under the impression that once i get the response from jms inout these
threads will be terminated.but i see that these threads are running through
out the route.

I am seeing this thread taking control after getting response from jms inout
operation. can you explain this behavior?

Camel (camel-1) thread #2 -
PersistentQueueReplyManager[jms_BT.edi.split.ACKQueue]-1| logstatement

Thanks
Ravi



--
View this message in context: 
http://camel.465427.n5.nabble.com/CAMEL-JMS-Request-TimeOut-tp5722000p5722040.html
Sent from the Camel - Users mailing list archive at Nabble.com.


CAMEL -JMS Request TimeOut

2012-11-01 Thread ravi.4indra
Hi,

I am seeing the below behaviour with camel-jms component.

inOut(jms:queue:quename?replyTo=queue1requestTimeOut=3)
to(direct:nextRoute); 

I think requestTimeOut is the time camel will wait to get response from the
queue.
But I noticed that the total timeout for the route is set to 3 ms. If my
route takes more that 3ms i am getting timeout exception. Is this the
expected behaviour?

and also noticed the thread JmsreplyTimeoutChecker running all the time what
is this thread for?

Any information is appreciated.

Thanks
Ravi



--
View this message in context: 
http://camel.465427.n5.nabble.com/CAMEL-JMS-Request-TimeOut-tp5722000.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Timeout on a route

2012-10-29 Thread ravi.4indra
I am still having that problem.I had removed responseContext,RequestContext
from the inMessage and added a requestContext with a new ClientPolicy .Do i
to remove any other headers?

below is the code snippet 

exchange.getIn().removeHeader(Client.RESPONSE_CONTEXT);
exchange.getIn().removeHeader(Client.REQUEST_CONTEXT);
 MapString, Object requestContext = new HashMapString, Object();
 HTTPClientPolicy clientPolicy = new HTTPClientPolicy();
 clientPolicy.setReceiveTimeout(1);
 requestContext.put(HTTPClientPolicy.class.getName(), clientPolicy);
exchange.getIn().setHeader(Client.REQUEST_CONTEXT , requestContext);

Thanks
Ravi



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Timeout-on-a-route-tp5721576p5721692.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Timeout on a route

2012-10-28 Thread ravi.4indra
Hi,

I am using camel-CXF component.I am suspecting that the request context is
being cached somewhere in the cxf/camel code thats the reason new timeout
value is not honored.

can you please provide a solution for this?

Thanks
Ravi



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Timeout-on-a-route-tp5721576p5721678.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Timeout on a route

2012-10-28 Thread ravi.4indra
Hi Willem,

I was able to set the timeout Dynamically FirstTime. But when i tried change
the client policy somwhere in  my route its not picking up the new value.

is this the expected behaviour?

Tanks
Ravi



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Timeout-on-a-route-tp5721576p5721675.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Timeout on a route

2012-10-28 Thread ravi.4indra
Also i dont have any default configuration. so the first time i set the
timeout it will remain as my default timeout for all the endpoints? 

bean(mapper,changeTimeOut)
to(cxf://webservice1)
bean(mapper,changeTimeOut)
to(cxf://webservice2)

I noticed that webservice2 is using the timeout value set during the first
step. can you explain this behaviour?

Thanks
Ravi



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Timeout-on-a-route-tp5721576p5721684.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Timeout on a route

2012-10-28 Thread ravi.4indra
Hi Willem,

Thanks for sharing the information. I have two webservices call in a camel
route. I am noticing that the timeout i have set for the first call is being
used for the second web service call. even though i have changed the timeout
in 3 step to less than the default timeout it is always taking the timeout
that is set first step.

1 to(bean:addTimeout)
2 to(cxf:webservice1)
3 to(bean:changeTimeout)
4 to(cxf:webservice2)

to change the timeout for the second web service call I removed the request
context from the header and added back the request context(client Policy)
with new timeout value. 

can you please suggest?

Thanks
Ravi



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Timeout-on-a-route-tp5721576p5721690.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Timeout on a route

2012-10-27 Thread ravi.4indra
Hi,

Is there a way to set timeout dynamically in camel-cxf component?.

So do the total timeout of 60 seconds, if the first webservice call took 10
seconds then the timeout of second webservice call is 60-10 seconds.

for this i need to set the timeout using exchange header. is it possible to
do? 

Thanks
Ravi



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Timeout-on-a-route-tp5721576p5721640.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Timeout on a route

2012-10-26 Thread ravi.4indra
Hi Raul,

can you please provide your inputs on the below piece of code. 

This method the uses the producer template asyncCallback to call the
commonRoute.and i used the future handle to get the response.

  public void getDataUsingProducerTemplate(Exchange exchange) throws
TimeoutException, InterruptedException, ExecutionException {
ProducerTemplate template = camelContext.createProducerTemplate();
FutureExchange future = template.asyncCallback(direct:commonRoute,
exchange, new  SynchronizationImpl());
// Retrieve the reply from the main thread, specifying a timeout
try {
future.get(2, TimeUnit.SECONDS);
}catch (TimeoutException e) {
//exchange.setException(e);
future.cancel(true);
Thread.sleep(1000)
throw e;
}
}

Without the thread sleep my global exception handler (On Exception) is not
able to catch the exception.

Thanks
Ravi




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Timeout-on-a-route-tp5721576p5721623.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel Timeout on a route

2012-10-25 Thread ravi.4indra
Hi,

Is there a way to specify timeout on a route.

Example
from(direct:route1)
.to(bean:dosomething)
.to(direct:commonRoute)

now if the commonRoute takes more than n milliseconds i want to get a
timeout exception. 

FYI I tried seda component I got the timeout exception after n seconds but
the commonRoute continued its processing(may be it runs on  different
thread).


Any help is appreciated.

Thanks
R



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Timeout-on-a-route-tp5721576.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel JMS Request Reply

2012-09-30 Thread ravi.4indra
Hi ,

I need some help with camel JMS Request reply (InOUT) 

I want my aggregation method to generate new exchange from replyMessage(it
is the meesage in replyto Queue/response for my request message) and a dummy
bean which returns a object.

can the aggregationStartegy get the message from replyTo Queue?. Is there a
way to force the camel to return the message from replytoQueue.
Any Help is appreciated.

Thanks
Ravi
below is the code i am tryiing

public void configure() throws Exception {

from(activemq:queue:EVENTS).multicast(new
Aggregation()).to(activemq:queue:Test1?replyTo=queue:Test3exchangePattern=InOutreplyToType=Exclusive,bean:getDummyString);
  
from(activemq:queue:Test1?exchangePattern).process(
new Processor() {
 public void process(Exchange exchange) throws 
Exception {
 exchange.getOut().setBody(Changed the 
exchange hello
world);
 }
}).to(activemq:queue:Test3);

}





--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-JMS-Request-Reply-tp5720247.html
Sent from the Camel - Users mailing list archive at Nabble.com.