Not writing to Error queue

2012-07-25 Thread nishant.rupani
I am usign a router to consume messages from MQ. On exception, I want write the incoming message to the error queue. However, it is not writing message to error queue. For testing, I called a method of a bean on exception and that worked fine. but it is not publishing the message to error queue.

Re: Not writing to Error queue

2012-07-25 Thread Willem Jiang
How did you setup the DeadLetterQueue ? On Wed, Jul 25, 2012 at 2:53 PM, nishant.rupani nishant.rup...@morganstanley.com wrote: I am usign a router to consume messages from MQ. On exception, I want write the incoming message to the error queue. However, it is not writing message to error

Splitting large binary file into chunks

2012-07-25 Thread sushil_vsk5
Hello: Is it possible to use the camel splitter in a streaming mode to split a large binary file (for example an Mp4 file) into fixed sized chunks? Or does the file always have to be text based? Regards, Sushil -- View this message in context:

Re: camel-nmr for camel 2.10

2012-07-25 Thread helander
When reading about the vm component it is described to be asynchronous, so it would not fit the request/reply case. Unless you build two separate paths, one for request and one for reply. Or did I miss something? /Lars -- View this message in context:

Re: Splitting large binary file into chunks

2012-07-25 Thread Willem Jiang
You use define a customer IteratorFactory to return Iterators for Splitter to use. import static org.apache.camel.builder.ExpressionBuilder.beanExpression; from(direct:streaming) .split(beanExpression(new MyCustomIteratorFactory(), iterator)) .streaming().to(activemq:my.parts) Willem

Re: Rest client

2012-07-25 Thread bitter geek
Hi Sergey, Can you elaborate on how to use CXF RS endpoint without using the producer? You help is much appreciated. Thanks, Bing On 7/24/12, Sergey Beryozkin sberyoz...@gmail.com wrote: I lost your private email, the CXF RS endpoint is safe, only the producer is not right now Cheers,

Route stops if more than one message is sent

2012-07-25 Thread Alistair Young
I have a route that adds a header to an incoming message and if the header already exists and is less than a certain value the message is delayed by 1s and sent back to the original topic. The flow is: route1 : producer - topicA - consumer route2: consumer - topicB - check header - delay 1s -

RE: Not writing to Error queue

2012-07-25 Thread nishant.rupani
I tried couple of ways. 1) onException useOriginalMessage=true exceptionjava.sql.SQLException/exception handled constanttrue/constant /handled bean ref=exceptionHandler method=exceptionPrint / to

Re: Rest client

2012-07-25 Thread Sergey Beryozkin
On 25/07/12 09:30, bitter geek wrote: Hi Sergey, Can you elaborate on how to use CXF RS endpoint without using the producer? The CXFRS producer is a component built on top of the CXF RS client code, however you do not have to use it in order to talk to a RS service given the way that

RE: Not writing to Error queue

2012-07-25 Thread nishant.rupani
I don't see any reference of retry or error queue write in logs. Method exceptionPrint is being called fine. Snippet of my context is - 1) camel:camelContext id=mainroute xmlns=http://camel.apache.org/schema/spring; trace=true onException

Re: Route stops if more than one message is sent

2012-07-25 Thread Alistair Young
I've removed all routes and now I'm getting random messages disappearing from the simplest possible route: excuse the lack of xml format - the email client is the worst in the world and won't let me send plain text. route from uri=activemq:topic:topicA to uri=activemq:topic:topicB route send 10

Re: Route stops if more than one message is sent

2012-07-25 Thread Vincent Nonnenmacher
You could use github to post a GIST of your routes DSL and post its URL here, so you CAN get help. On Wednesday, July 25, 2012, Alistair Young wrote: I've removed all routes and now I'm getting random messages disappearing from the simplest possible route: excuse the lack of xml format -

Re: Route stops if more than one message is sent

2012-07-25 Thread Alistair Young
good idea! I've tracked the missing messages to transactions. I had ActiveMQConnectionFactory and ActiveMQComponent both defined in camel.xml. If I only use ActiveMQConnectionFactory with JmsTransactionManager the routing works perfectly with transactions enabled. I've just run 2 messages through

Re: ExtendedClassNotFoundException PooledConnectionFactory

2012-07-25 Thread Willem Jiang
It looks like you are using OSGi, can you double check if your bundle imports the package of org.apache.activemq.pool On 7/24/12 5:32 PM, m.jimen.blazquez wrote: Hi! I am using using camel 2.9.0 with JMS camel component in my application with ActiveMQ server (works perfectly). bean id=jms

Using ActiveMQConnectionFactory and ActiveMQComponent together

2012-07-25 Thread Alistair Young
I've been following the Camel in Action book which uses ActiveMQConnectionFactory and ActiveMQComponent in the same camel.xml for transactions. If I use this config about 80% of messages are lost. I have to use ActiveMQConnectionFactory and remove ActiveMQComponent. Is the use of both only for

FTP connect issue

2012-07-25 Thread Nafees
Hi All, I have a Route which gets files from FTP and copies to local folder, and another route which picks up files and do some processing and the routes stops when files count reaches ftpserver file count and route will be removed from camelcontext. All necessary information will be coming from

Re: CXFRS does not process JSON

2012-07-25 Thread Sergey Beryozkin
Hi On 25/07/12 11:12, hom wrote: In order to configure the JSONProvider, I switched to the server approach: jaxrs:server id=providerPOXJSON address=/xyz/json jaxrs:serviceBeans ref component-id=providerAdapter/ /jaxrs:serviceBeans jaxrs:providers

Re: Using ActiveMQConnectionFactory and ActiveMQComponent together

2012-07-25 Thread Alistair Young
this is my camel.xml: https://gist.github.com/3175958 The commented out ActiveMQComponent section for transactions, if used, causes almost 100% message loss in the 'blackboard' route. I can only use JmsTransactionManager + ActiveMQConnectionFactory. The commented out section is from Camel in

Re: CXFRS does not process JSON

2012-07-25 Thread hom
The provider then needs to be registered directly with the rs endpoint The classloading error is gone now, but I have no idea how register the jsonprovider with the rs endpoint. How can this be done? -- View this message in context:

Re: CXFRS does not process JSON

2012-07-25 Thread Sergey Beryozkin
Hi On 25/07/12 16:37, hom wrote: The journey comes to an end. I managed to create the json endpoint. It does not use Camel but plain CXF. This is the final configuration (quite simple actually ;-) ): jaxrs:server id=providerPOXJSON address=/xyz/json jaxrs:serviceBeans

Re: How to handle http status code

2012-07-25 Thread dunnlow
I handle that with a try/catch block. http://camel.apache.org/try-catch-finally.html -J -- View this message in context: http://camel.465427.n5.nabble.com/How-to-handle-http-status-code-tp5716346p5716470.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel ActiveMQ consumers do not consume after restart

2012-07-25 Thread Marco Zapletal
For producing messages to AMQ, we are using the InOnly pattern only. The routes in C1 look quite easy, one is consuming from the file system and producing to AMQ, the other one is consuming from AMQ and producing to the file system. Within C2, we have now about 20 routes, which basically

Re: CxfRsProducer is not thread safe

2012-07-25 Thread Sergey Beryozkin
As a sanity check I've run the multi-threaded test on the trunk and 2.9.x due to diff CXF versions being used there, still things work OK. Dumitru, I've been telling everyone CXF RS producer is broken :-), so need your help with reproducing the case. Are you having multiple threads running

Camel SEDA queue size not setting up

2012-07-25 Thread wantastic
Hello all, I set up the seda endpoint and tried to monitor the status. to uri=seda:processMsg?size=100;blockWhenFull=true / However, when I look at the seda endpoint with jConsole, I see that the size and blockWhenFull is not set up. Is this a known bug or am I doing something wrong?

Re: CxfRsProducer is not thread safe

2012-07-25 Thread dumi_p
Hi Sergey, Sorry for the late response, I could not work today on the issue - other things to do :-(. I will reproduce it tomorrow and send you the full code, together with the JMX for JMeter load test. Note in my test, with 10 concurrent threads it was failing on more than 20 percent of the

Re: Rest client

2012-07-25 Thread bitter geek
Hi Sergey, I'm quite new to Camel, still trying to get my head around a few concepts. How do you create a CXFR producer? Or for that matter, how do you specify what type of producer to create? Does this have anything to do with the header CxfConstants.CAMEL_CXF_RS_USING_HTTP_API as shown below?

Re: Camel SEDA queue size not setting up

2012-07-25 Thread Babak Vahdat
Hi While using the XML DSL you should escape the character with amp; So can you try with: to uri=seda:processMsg?size=100amp;blockWhenFull=true / Babak Am 25.07.12 20:25 schrieb wantastic unter wan@barclays.com: Hello all, I set up the seda endpoint and tried to monitor the status.

Exception handling in consumer of my custom component

2012-07-25 Thread gilboy
Hi Assume I have a route which goes: *from(custom:component).process().to()..etc* Lets also assume I have an exception/error/retry policy set on this route. In my custom component consumer I need to invoke something like: * Exchange exchange = endpoint.createExchange();

Re: Question regarding SEDA threadpool

2012-07-25 Thread Christian Müller
Hello Wan! Use the concurrentConsumers option [1]. camelContext route from uri=pns-jms:queue:blahblah?concurrentConsumers=10 / wireTap uri=dataLogger / to uri=myValidationProcess / to uri=myConvertProcess / route /camelContext [1] http://camel.apache.org/jms.html Best,

Re: Question regarding SEDA threadpool

2012-07-25 Thread wantastic
Christian, Thank you for your feedback. Unfortunately, I am not able to use concurrentConsumer because the queue is exclusive and only allow one consumer. Do you see any other way to use the model that I explained above, which has one consumer distributing messages to other worker threads to

Re: camel-nmr for camel 2.10

2012-07-25 Thread Christian Müller
There is also a synchronous vm component [1]. However, using asynchronous routing has nothing to do with the message exchange pattern (MEP), e.g. request/reply. Asynchronous means the request is processed in a separate thread. If you use the inOut MEP (request/reply), Camel will take care of

Re: Rest client

2012-07-25 Thread Sergey Beryozkin
Hi On 25/07/12 20:00, bitter geek wrote: Hi Sergey, I'm quite new to Camel, still trying to get my head around a few concepts. Well, even though a CXFRS component has been around for few years now, I haven't had any contributions done, very minor ones, it really works thanks to all the

Re: Splitting large binary file into chunks

2012-07-25 Thread Christian Müller
Checkout http://camel.apache.org/splitter.html I'm not sure whether .streaming() has any effect, if you provide your own splitter bean... Your custom splitter bean (the Iterator) could receive the file handle and use a FileInputStream to read the file content in chunks. For each next() method call

Re: Not writing to Error queue

2012-07-25 Thread Christian Müller
With MQ, do you mean what? WebSphere MQ (I assume), ActiveMQ, RabittMQ, ... If you use WebSphere MQ, you have to create the ERROR queue upfront, did you? Best, Christian On Wed, Jul 25, 2012 at 8:53 AM, nishant.rupani nishant.rup...@morganstanley.com wrote: I am usign a router to consume

Re: Route stops if more than one message is sent

2012-07-25 Thread Christian Müller
Hello Alistair! I do not think you found the real issue. But as Vincent already wrote, without more detailed information, we cannot really help. I recommend again you should study http://camel.apache.org/support.html Best, Christian On Wed, Jul 25, 2012 at 12:51 PM, Alistair Young

Re: ClassCastException using cxf:bean

2012-07-25 Thread Christian Müller
Cool you could resolve the issue by yourself. Best, Christian On Wed, Jul 25, 2012 at 1:10 PM, cgiera christoph.gi...@mic-cust.comwrote: I've added the synchronized modifier to the RegistryBean.getBean() method and the problem is fixed for now. Hopefully I can upgrade to a newer version of

Re: camel-nmr for camel 2.10

2012-07-25 Thread helander
Ok, thanks. The description of *vm* does not state anything about being able to use in an osgi container, while the *direct-vm* page is very explicit about this. My interpretation was that *vm* did not support crossing bundle boundaries. Whatever the capability is for *vm*, maybe it woul be nice

Re: Using ActiveMQConnectionFactory and ActiveMQComponent together

2012-07-25 Thread Christian Müller
Checkout [1]. There is a test which tests JMS transaction in Camel with the configuration you can find here [2]. [1] https://github.com/muellerc/camel-in-transaction/ [2]

Re: camel-nmr for camel 2.10

2012-07-25 Thread Christian Müller
All Camel components are designed to run in an OSGI environment. The cool think with direct-vm is it use the same thread which means both routes can share the same transaction context (which is not the case with vm). Best, Christian On Wed, Jul 25, 2012 at 11:43 PM, helander leh...@gmail.com

Re: Camel ActiveMQ consumers do not consume after restart

2012-07-25 Thread Christian Müller
I don't think this was the issue. But without to know which version of Camel and ActiveMQ do you use and how your ActiveMQ component is configured, I cannot help... Best, Christian On Wed, Jul 25, 2012 at 6:22 PM, Marco Zapletal marco.zaple...@gmail.comwrote: For producing messages to AMQ, we

Re: Exception handling in consumer of my custom component

2012-07-25 Thread Christian Müller
In your consumer, you could call getExceptionHandler().handleException(e); Best, Christian On Wed, Jul 25, 2012 at 11:01 PM, gilboy josephoto...@gmail.com wrote: Hi Assume I have a route which goes: *from(custom:component).process().to()..etc* Lets also assume I have an

Re: ClassCastException using cxf:bean

2012-07-25 Thread Willem Jiang
Just FYI, I logged a JIRA[1] and committed the patch into camel. [1] https://issues.apache.org/jira/browse/CAMEL-5468 On Thu, Jul 26, 2012 at 5:41 AM, Christian Müller christian.muel...@gmail.com wrote: Cool you could resolve the issue by yourself. Best, Christian On Wed, Jul 25, 2012 at

Re: Rest client

2012-07-25 Thread Willem Jiang
Please check out my comments in the mail. On Thu, Jul 26, 2012 at 3:00 AM, bitter geek bitterg...@gmail.com wrote: Hi Sergey, I'm quite new to Camel, still trying to get my head around a few concepts. How do you create a camel-cxfrs producer? Or for that matter, how do you specify what type

Re: Question regarding SEDA threadpool

2012-07-25 Thread Willem Jiang
On Wed, Jul 25, 2012 at 6:40 AM, wantastic wan@barclays.com wrote: Hello all, I am a beginner of Camel and trying to figure out how to create route properly. What I'm trying to do is pretty simple. I have a JMS queue listener which takes message one by one. Then this message will be

Re: CxfRsProducer is not thread safe

2012-07-25 Thread Willem Jiang
Dumitru do you mind to create a JIRA[1] here. It will be helpful for us to trace the issue. [1]https://issues.apache.org/jira/browse/CAMEL Willem On Thu, Jul 26, 2012 at 2:55 AM, dumi_p dumitru.pa...@gmail.com wrote: Hi Sergey, Sorry for the late response, I could not work today on the issue

Re: Add thread pool configuration for SEDA using xml

2012-07-25 Thread billy ding
Hi Claus, Thanks for your reply. So can we conclude, if we use xml configuration for seda, we can't have a thread pool which can increase/shrink dynamically at runtime, is that right? Thanks. Billy -- View this message in context: