Re: ActiveMQ composite destination producer
Thanks The example I reported though is properly pushing 2 messages on the broker though. So it seems to work but not supporting a mix of topic and queue in the list. correct me if I am wrong but using multicast is not exactly the same thing of using composite destinations, if I've understood it correctly when we push to a composite destination it is the broker 'cloning' the message and publishing it in several destinations; if we use multicast we'll basically produce and 2 (or more) distinct messages to the broker looking forward for your comments -- View this message in context: http://camel.465427.n5.nabble.com/ActiveMQ-composite-destination-producer-tp5736860p5736896.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: How to Pause Quartz Componenent
Hi Yeah this is a bug https://issues.apache.org/jira/browse/CAMEL-6614 You can use stop/start instead. On Tue, Jul 23, 2013 at 11:43 AM, Dayakar daya.kond...@gmail.com wrote: Hi, I am using Quartz Component which run Daily at 20:00 I configured it as from(quartz://myGroup/myTimerName?cron=0+0+20+1/1+*+?+*).routeid(MainRoute).to(jms:queue:outBoundQueue) I need to pause the Route for few Days Iam using camelContext.suspendRoute(MainRoute); But still Quartz is firing . How can i pause Quartz Component Thanks in Advance Regards, Dayakar -- View this message in context: http://camel.465427.n5.nabble.com/How-to-Pause-Quartz-Componenent-tp5736101.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: camel - Activemq strange behaviour
Hi Thanks a lot. So we should have unique queue names in cluster environment, if we are using replyToType as exclusive or temporary queues can be used. - Regards kiran Reddy -- View this message in context: http://camel.465427.n5.nabble.com/camel-Activemq-strange-behaviour-tp5736812p5736908.html Sent from the Camel - Users mailing list archive at Nabble.com.
Using camel route for parsing a csv file
Hello, We have a simple scenario of reading a CSV file and persisting the records into database. We have following route configured for the same: routeContext id=persistIRDCF1 xmlns=http://camel.apache.org/schema/spring; route id=IRD_CF1_LN_FILE_BATCH from uri=file://C://Temp//test.csv/ split streaming=true parallelProcessing=true tokenize token=\n group=2/ unmarshal csv/ /unmarshal /split to uri= sql:INSERT INTO mytable (name, height, comments) VALUES (#, #, #)?dataSourceRef=tsyoneDatasource/ /route /routeContext We get following error while executing: Exception in thread main java.lang.NoClassDefFoundError: org/apache/commons/csv/writer/CSVConfig at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethod(Class.java:1935) at org.springframework.core.LocalVariableTableParameterNameDiscoverer$LocalVariableTableVisitor.resolveMember(LocalVariableTableParameterNameDiscoverer.java:236) at org.springframework.core.LocalVariableTableParameterNameDiscoverer$LocalVariableTableVisitor.visitEnd(LocalVariableTableParameterNameDiscoverer.java:219) at org.springframework.asm.ClassReader.accept(Unknown Source) at org.springframework.asm.ClassReader.accept(Unknown Source) From what we read, we should be including camel-csv.jar file in classpath to get this working. We could check that the camel-csv jar is correctly added to the classpath. We are using camel 2.11.0 version. Can you please advise if we are missing something here. Thank you, Regards vkarkhanis -- View this message in context: http://camel.465427.n5.nabble.com/Using-camel-route-for-parsing-a-csv-file-tp5736910.html Sent from the Camel - Users mailing list archive at Nabble.com.
Unable start Camel bundle deployed on OSGi in EAP 6.1
Hi I have made following bundle. MML-WS-Gateway-1.0.0-SNAPSHOT.jar http://camel.465427.n5.nabble.com/file/n5736911/MML-WS-Gateway-1.0.0-SNAPSHOT.jar After deploying this to OSGi of EAP 6.1, I am always getting following error. Please could you help me? / MSC01: Failed to start service jbosgi.PersistentBundles.RESOLVE: org.jboss.msc.service.StartException in service jbosgi.PersistentBundles.RESOLVE: Failed to start service/ -- View this message in context: http://camel.465427.n5.nabble.com/Unable-start-Camel-bundle-deployed-on-OSGi-in-EAP-6-1-tp5736911.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Dynamic xsl with custom uri resolver
From what I am seeing, you can specify the custom resolver within the header {code} .setHeader(CamelXsltResourceUri,simple(xslt:http://localhost:8080/path/to/template?*uriResolver=#myResolver*) {/code} and it gets exercises at run time. When I place break points within my resolver and execute this route, it will step through the code. Claus Ibsen-2 wrote The CamelXsltResourceUri header is *only* for the location of the xls file. Any other options like a custom resolver must be set on the endpoint / component level. On Tue, Aug 6, 2013 at 8:39 PM, ericsodt lt; dean.ericson@.mit gt; wrote: Claus, The question I am asking is not one that can be resolved by the FAQ you pointed to. I notice this question gets posted a lot and no one seems to be fully answering it. Here's my go at it: The Camel xslt docs mention Dynamic Stylesheets by saying the following: /*Available as of Camel 2.9* Camel provides the CamelXsltResourceUri header which you can use to define a stylesheet to use instead of what is configured on the endpoint URI. This allows you to provide a dynamic stylesheet at runtime./ I wish they could have supported their documentation better and provided an example. Hopefully the example below will help others. {code} // register myResolver bean SimpleRegistry sr = new SimpleRegistry(); sr.put(myResolver, new MyResolver()); from(direct:location) .setHeader(CamelXsltResourceUri, simple(xslt:http://localhost:8080/ path / to / template ?uriResolver=#myResolver)) .to(xslt:placeHolderTemplate.xsl) {/code} Then within the myResolver class, fetch a remote resource and pull down the xml you wish to use. NOTE: placeHolderTemplate.xsl is a real file located on the classpath for compile-time validation. Once we execute this route and Camel see's the CamelXsltResourceUri property in the headers, it will use the properties value as an argument into myResolver. MyResolver looks like the following: {code} class MyResolver extends XsltUriResolver { public Source resolve(String href, String base) throws TransformerException { if(href.contains(xslt:)){ // do logic to get resource } } } {/code} I hope that helps -- View this message in context: http://camel.465427.n5.nabble.com/Dynamic-xsl-with-custom-uri-resolver-tp5736668p5736862.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cibsen@ Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen -- View this message in context: http://camel.465427.n5.nabble.com/Dynamic-xsl-with-custom-uri-resolver-tp5736668p5736912.html Sent from the Camel - Users mailing list archive at Nabble.com.
Unable to use move,movefailed and donefilename with consumer template endpoint Uri
Hi, I have gone through lots of regarding the issue and came to know if I use consumer.receiveBody() I can move the file but when I am using it I am getting error like: Exception while consuming the locates file:null :Failed to resolve endpoint: file:///home/... Failed to resolve endpoint: Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{amp;doneFileName=LOADAVAILBNYM, amp;move=/home/cameldata/processedFiles/${file:onlyname.noext}_${date:now:MMdd}.TXT, amp;moveFailed=/home/cameldata/errorfile}] Here is my function to consume a file from the directory: public void consumeBnymFile(Exchange arg) { String endPointUri=file:{{inbound_home}}/bony?include=.*_BNYM_.*txtamp;move={{data_home}}/${file:onlyname.noext}_${date:now:MMdd}.TXTamp;moveFailed={{data_home}}/errorfileamp;doneFileName=LOADAVAILBNYM; consumer.start(); while (true) { Object newBody=consumer.receiveBody(endPointUri, 2000); //Exchange ex = consumer.receive(fileUri,2000); String streamName=(String)arg.getIn().getHeader(streamName); if (newBody != null) { arg.getIn().setBody(newBody); { I greatlty appreciate any help in advance. Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Unable-to-use-move-movefailed-and-donefilename-with-consumer-template-endpoint-Uri-tp5736913.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Flatpack and aggregation
Hi Zemian, Thanks for putting me on the right track with the idempotentConsumer! Since Flatpack puts the records in a Java Map in the Body I had to do a convertTo and ended up with the following: bean id=organisationMemoryRepository class=org.apache.camel.processor.idempotent.MemoryIdempotentRepository / ... route id=process-line from uri=flatpack:fixed:kbo.pzmap.xml / convertBodyTo type=java.util.Map/ filter ognlrequest.body[ACTION] == 070/ognl idempotentConsumer messageIdRepositoryRef=organisationMemoryRepository ognlrequest.body[ORGANISATION]/ognl to uri=log:be.roots.organisation?level=INFO / !-- TODO: send it to the webservice -- /idempotentConsumer /filter /route This seems to work as expected :-) Cheers, Tom Tom Fornoville Senior Developer m: +32 478 65 86 51 www.roots.be On Wed, Aug 7, 2013 at 3:46 AM, saltnlight5 [via Camel] ml-node+s465427n5736874...@n5.nabble.com wrote: Hello Tom, I think you can try flatpack with one of the idempotent consumer ( http://camel.apache.org/idempotent-consumer.html) to eliminate duplicated messages. For example, maybe something like this: from(file:inbox) .to(flatpack:fixed:yourdata.pzmap.xml) .filter(header(action_id)) .idempotentConsumer(header(organisation_id), MemoryIdempotentRepository.memoryIdempotentRepository(200)) Also alternative to flatpack, you may also checkout Camel bindy: http://camel.apache.org/bindy.html to parse fixed length records. Have fun, Zemian -- If you reply to this email, your message will be added to the discussion below: http://camel.465427.n5.nabble.com/Flatpack-and-aggregation-tp5736837p5736874.html To unsubscribe from Flatpack and aggregation, click herehttp://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5736837code=dG9tLmZvcm5vdmlsbGVAcm9vdHMuYmV8NTczNjgzN3wxNzA0MjEyMTky . NAMLhttp://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://camel.465427.n5.nabble.com/Flatpack-and-aggregation-tp5736837p5736914.html Sent from the Camel - Users mailing list archive at Nabble.com.
Lots of ActiveMQMessageConsumer with selector JMSCorrelationID='CamelDummyJmsMessageSelector'
Hello, after about 1 day usage, I got a strange situation - there are lot of ActiveMQMessageConsumers created (~640k) with selector JMSCorrelationID='CamelDummyJmsMessageSelector'. All consumer objects use around 1GB heap memory. Camel route is quite simple: route id=... from ref=... / setExchangePattern pattern=InOut / .. removing some headers from exchange... doTry recipientList method ref=queueMapper method=mapSync / /recipientList doCatch/doCatch /doTry /route queueMapper bean just returns String from properties, in this case it is activemq:REQUEST?replyTo=RESPONSEreceiveTimeout=250requestTimeout=34000 ActiveMQ configuration: osgi:reference id=jmsConnectionFactory interface=javax.jms.ConnectionFactory filter=(name=activemq) / bean id=jmsConfiguration class=org.apache.camel.component.jms.JmsConfiguration property name=connectionFactory ref=jmsConnectionFactory / property name=transacted value=false / property name=maxConcurrentConsumers value=5 / property name=cacheLevelName value=CACHE_NONE / /bean bean id=activemq class=org.apache.activemq.camel.component.ActiveMQComponent property name=configuration ref=jmsConfiguration / /bean Heap usage is growing, consumer objects are not cleaned and heap growing dosn't depend on system load. But when doing a heap dump, most of consumers are destoyed (in my case, ~700mb heap memory was released). Any ideas why camel creates so many activemq consumers with JMSCorrelationID='CamelDummyJmsMessageSelector'? As I understand, with such correlationId no messages will be received ever camel version 2.7.1.fuse-00-43 java 1.6.0_43 Justas -- View this message in context: http://camel.465427.n5.nabble.com/Lots-of-ActiveMQMessageConsumer-with-selector-JMSCorrelationID-CamelDummyJmsMessageSelector-tp5736921.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Unable to use move,movefailed and donefilename with consumer template endpoint Uri
Hi Read the javadoc of the consumer template, it tells you what to do. On Wed, Aug 7, 2013 at 3:17 PM, skumar sku...@stonewain.com wrote: Hi, I have gone through lots of regarding the issue and came to know if I use consumer.receiveBody() I can move the file but when I am using it I am getting error like: Exception while consuming the locates file:null :Failed to resolve endpoint: file:///home/... Failed to resolve endpoint: Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{amp;doneFileName=LOADAVAILBNYM, amp;move=/home/cameldata/processedFiles/${file:onlyname.noext}_${date:now:MMdd}.TXT, amp;moveFailed=/home/cameldata/errorfile}] Here is my function to consume a file from the directory: public void consumeBnymFile(Exchange arg) { String endPointUri=file:{{inbound_home}}/bony?include=.*_BNYM_.*txtamp;move={{data_home}}/${file:onlyname.noext}_${date:now:MMdd}.TXTamp;moveFailed={{data_home}}/errorfileamp;doneFileName=LOADAVAILBNYM; consumer.start(); while (true) { Object newBody=consumer.receiveBody(endPointUri, 2000); //Exchange ex = consumer.receive(fileUri,2000); String streamName=(String)arg.getIn().getHeader(streamName); if (newBody != null) { arg.getIn().setBody(newBody); { I greatlty appreciate any help in advance. Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Unable-to-use-move-movefailed-and-donefilename-with-consumer-template-endpoint-Uri-tp5736913.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Lots of ActiveMQMessageConsumer with selector JMSCorrelationID='CamelDummyJmsMessageSelector'
Try a newer Camel version as this is fixed in a later release On Wed, Aug 7, 2013 at 3:48 PM, tnk jus...@gmail.com wrote: Hello, after about 1 day usage, I got a strange situation - there are lot of ActiveMQMessageConsumers created (~640k) with selector JMSCorrelationID='CamelDummyJmsMessageSelector'. All consumer objects use around 1GB heap memory. Camel route is quite simple: route id=... from ref=... / setExchangePattern pattern=InOut / .. removing some headers from exchange... doTry recipientList method ref=queueMapper method=mapSync / /recipientList doCatch/doCatch /doTry /route queueMapper bean just returns String from properties, in this case it is activemq:REQUEST?replyTo=RESPONSEreceiveTimeout=250requestTimeout=34000 ActiveMQ configuration: osgi:reference id=jmsConnectionFactory interface=javax.jms.ConnectionFactory filter=(name=activemq) / bean id=jmsConfiguration class=org.apache.camel.component.jms.JmsConfiguration property name=connectionFactory ref=jmsConnectionFactory / property name=transacted value=false / property name=maxConcurrentConsumers value=5 / property name=cacheLevelName value=CACHE_NONE / /bean bean id=activemq class=org.apache.activemq.camel.component.ActiveMQComponent property name=configuration ref=jmsConfiguration / /bean Heap usage is growing, consumer objects are not cleaned and heap growing dosn't depend on system load. But when doing a heap dump, most of consumers are destoyed (in my case, ~700mb heap memory was released). Any ideas why camel creates so many activemq consumers with JMSCorrelationID='CamelDummyJmsMessageSelector'? As I understand, with such correlationId no messages will be received ever camel version 2.7.1.fuse-00-43 java 1.6.0_43 Justas -- View this message in context: http://camel.465427.n5.nabble.com/Lots-of-ActiveMQMessageConsumer-with-selector-JMSCorrelationID-CamelDummyJmsMessageSelector-tp5736921.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Lots of ActiveMQMessageConsumer with selector JMSCorrelationID='CamelDummyJmsMessageSelector'
Thanks for quick reply. The problem is, I can't update camel version because the system is running is production with a lot bundles. Upgrading to new camel requires a lot of refactoring due to api changes... Is there any workaround (other than upgrading camel) possible in this case? -- View this message in context: http://camel.465427.n5.nabble.com/Lots-of-ActiveMQMessageConsumer-with-selector-JMSCorrelationID-CamelDummyJmsMessageSelector-tp5736921p5736924.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Using camel route for parsing a csv file
It looks like you may also need to add the apache commons-csv jar to your class path. This is one of the dependencies of the camel-csv jar: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-csv Jared -- View this message in context: http://camel.465427.n5.nabble.com/Using-camel-route-for-parsing-a-csv-file-tp5736910p5736925.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Lots of ActiveMQMessageConsumer with selector JMSCorrelationID='CamelDummyJmsMessageSelector'
Use temporary queues for the replies instead of the shared queue. Or patch the camel-jms with the bug fix yourself. On Wed, Aug 7, 2013 at 4:02 PM, tnk jus...@gmail.com wrote: Thanks for quick reply. The problem is, I can't update camel version because the system is running is production with a lot bundles. Upgrading to new camel requires a lot of refactoring due to api changes... Is there any workaround (other than upgrading camel) possible in this case? -- View this message in context: http://camel.465427.n5.nabble.com/Lots-of-ActiveMQMessageConsumer-with-selector-JMSCorrelationID-CamelDummyJmsMessageSelector-tp5736921p5736924.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Lots of ActiveMQMessageConsumer with selector JMSCorrelationID='CamelDummyJmsMessageSelector'
Is this problem related to recipientList? Or it is general issue with camel request/reply over jms? I haven't noticed this behaviour in other routes with InOut pattern over amq queue. Do you have any link to jira issue or other pages where this problem is described? Thank you. -- View this message in context: http://camel.465427.n5.nabble.com/Lots-of-ActiveMQMessageConsumer-with-selector-JMSCorrelationID-CamelDummyJmsMessageSelector-tp5736921p5736927.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Using camel route for parsing a csv file
sub project camel-csv has the following dependency in its POM: *dependency groupIdorg.apache.servicemix.bundles/groupId artifactIdorg.apache.servicemix.bundles.commons-csv/artifactId version${commons-csv}/version /dependency* There you can find there the class CSVConfig. -- View this message in context: http://camel.465427.n5.nabble.com/Using-camel-route-for-parsing-a-csv-file-tp5736910p5736928.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel rabbitmq
I ran into this as well and can be worked around by adding this between your from and to: .setHeader(RabbitMQConstants.EXCHANGE_NAME).constant(A) -- View this message in context: http://camel.465427.n5.nabble.com/camel-rabbitmq-tp5736483p5736930.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel - Activemq strange behaviour
On Wed, Aug 7, 2013 at 3:08 AM, kiranreddykasa kirankuma...@fss.co.inwrote: Hi Thanks a lot. So we should have unique queue names in cluster environment, if we are using replyToType as exclusive This is correct. The camel docs explicitly say not to use Exclusive in your type of deployment: A shared queue can be used in a clustered environment with multiple nodes running this Camel application at the same time When using exclusive reply queues, then JMS Message selectors are *not*in use, and therefore other applications must not use this queue as well. An exclusive queue *cannot* be used in a clustered environment with multiple nodes running this Camel application at the same time or temporary queues can be used. - Regards kiran Reddy -- View this message in context: http://camel.465427.n5.nabble.com/camel-Activemq-strange-behaviour-tp5736812p5736908.html Sent from the Camel - Users mailing list archive at Nabble.com. -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta
Re: ActiveMQ composite destination producer
This might be what you're looking for. Check out Composite Destination section on this wiki: http://activemq.apache.org/virtual-destinations.html On Wed, Aug 7, 2013 at 1:36 AM, Marco Crivellaro marco.cr...@gmail.comwrote: Thanks The example I reported though is properly pushing 2 messages on the broker though. So it seems to work but not supporting a mix of topic and queue in the list. correct me if I am wrong but using multicast is not exactly the same thing of using composite destinations, if I've understood it correctly when we push to a composite destination it is the broker 'cloning' the message and publishing it in several destinations; if we use multicast we'll basically produce and 2 (or more) distinct messages to the broker looking forward for your comments -- View this message in context: http://camel.465427.n5.nabble.com/ActiveMQ-composite-destination-producer-tp5736860p5736896.html Sent from the Camel - Users mailing list archive at Nabble.com. -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta
Re: Lots of ActiveMQMessageConsumer with selector JMSCorrelationID='CamelDummyJmsMessageSelector'
Take a look here: https://issues.apache.org/jira/browse/CAMEL-2740 On Wed, Aug 7, 2013 at 7:24 AM, tnk jus...@gmail.com wrote: Is this problem related to recipientList? Or it is general issue with camel request/reply over jms? I haven't noticed this behaviour in other routes with InOut pattern over amq queue. Do you have any link to jira issue or other pages where this problem is described? Thank you. -- View this message in context: http://camel.465427.n5.nabble.com/Lots-of-ActiveMQMessageConsumer-with-selector-JMSCorrelationID-CamelDummyJmsMessageSelector-tp5736921p5736927.html Sent from the Camel - Users mailing list archive at Nabble.com. -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta
Re: Unit of Work Scope and direct/SEDA/vm components
Could you also do the following? from(...)..to(vm:name).process(new Processor() { public void process(Exchange exchange) { exchange.getUnitOfWork().done(); } }); On Tue, Aug 6, 2013 at 7:11 AM, Scott Parkerson sc...@parkerson.net wrote: Bilgin, Thank you -- that's what I expected, so I'll give using a JMS queue a try. --sgp On Mon, Aug 5, 2013 at 2:45 PM, Bilgin Ibryam bibr...@gmail.com wrote: Hi, The file component uses onCompletion for moving files after the exchange has completed. As long as the completions are passed with the exchange the files wont move. The VM component passes the completions to the next camel context so the files are not moved... You have to use a queue or something like wiretap to stop completions. HTH Bilgin Sent from mobile On 5 Aug 2013 18:07, Scott Parkerson sc...@parkerson.net wrote: Hi, fellow Camel riders. I was wondering where Camel's notion of UnitOfWork begins and ends with respect to processing a route or set of routes. For example, I have a route that starts with a SFTP poller that consumes files off of a server. The contents of these files are then handed to another route via the direct component, which is responsible for filtering and routing the data to other processors that are on multiple camel contexts. As such, I have been using the vm component to pass that data to the appropriate processing route. What's strange is that it seems like the files are not marked as processed (i.e. the original SFTP component does not move the files to the processed directory until the message is completely handled by the second route. This is a problem because the second route actually splits and aggregates data in the file, and, as such, the data may not be released from the aggregator until later. Furthermore, the SFTP connection in the body may not be valid anymore, and even if it is, it seems like splitting the data also splits the notion that that data came from a SFTP consumer, which makes lots of stack traces. What I want to know is: how can I make sure that the file on the SFTP server is marked processed before it goes off to the handling route? Do I need to send the data to a file or an JMS/ActiveMQ queue first? Thanks, Scott Parkerson -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta
Limit concurrency to messages with different headers
I need to process orders from multiple companies and then send them out. The logic for processing is almost identical but I need to send all messages from a company out in the exact sequence as they are received.Therefore, I would like to have concurrency but need to apply concurrency only when the messages are for different companies. Another way to say this is that, I want all messages from one company to be processed singled threaded. One way that I can do this is to route the messages into different SEDA queues based on the company names. Then process messages from each SEDA queue single threaded. But I do not want to duplicate my route definition for each company in my Spring xml file (to consume from each separate SEDA queue). Is there an elegant way to do this (in Camel with Spring)? Thanks in advance! -- View this message in context: http://camel.465427.n5.nabble.com/Limit-concurrency-to-messages-with-different-headers-tp5736945.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Limit concurrency to messages with different headers
Can you use content based router to two endpoints: seda with one thread vs seda with multiple threads? and then use resequencer to put the messages back in order? On Wed, Aug 7, 2013 at 12:24 PM, bocamel johnz...@gmail.com wrote: I need to process orders from multiple companies and then send them out. The logic for processing is almost identical but I need to send all messages from a company out in the exact sequence as they are received. Therefore, I would like to have concurrency but need to apply concurrency only when the messages are for different companies. Another way to say this is that, I want all messages from one company to be processed singled threaded. One way that I can do this is to route the messages into different SEDA queues based on the company names. Then process messages from each SEDA queue single threaded. But I do not want to duplicate my route definition for each company in my Spring xml file (to consume from each separate SEDA queue). Is there an elegant way to do this (in Camel with Spring)? Thanks in advance! -- View this message in context: http://camel.465427.n5.nabble.com/Limit-concurrency-to-messages-with-different-headers-tp5736945.html Sent from the Camel - Users mailing list archive at Nabble.com. -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta
Re: Unable to use move,movefailed and donefilename with consumer template endpoint Uri
Claus, I have gone through the section Timer based polling consumer at http://camel.apache.org/polling-consumer.html as I am using a timer in my route defnition. I try to follow it but still getting the same error.It seems some thing is wrong with the endpoint itself String endPointUri=file:{{inbound_home}}/bony?include=.*_BNYM_.*txtamp;move={{data_home}}/${file:onlyname.noext}_${date:now:MMdd}.TXTamp;moveFailed={{data_home}}/errorfileamp;doneFileName=LOADAVAILBNYM; But this endpoint was working when I was using it in xml route defnition with from component. I have just to consume a file from a directory location,read it and shift to another directory based on availability of a trigger file named LOADAVAILBNYM. So I am not doing any Endpoint inject nor using producer template. Please give some hint is this a write way to do.I don't have much experience with camel and I don't think I have very clear grasping of consumer template. Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Unable-to-use-move-movefailed-and-donefilename-with-consumer-template-endpoint-Uri-tp5736913p5736948.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Using camel route for parsing a csv file
camel-csv cmueller$ mvn dependency:tree [INFO] Scanning for projects... [INFO] [INFO] [INFO] Building Camel :: CSV 2.11.0 [INFO] [INFO] [INFO] --- maven-dependency-plugin:2.6:tree (default-cli) @ camel-csv --- [INFO] org.apache.camel:camel-csv:bundle:2.11.0 [INFO] +- org.apache.camel:camel-core:jar:2.11.0:compile [INFO] | \- org.slf4j:slf4j-api:jar:1.6.6:compile (version managed from 1.6.6) [INFO] +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-csv:jar:1.0-r706899_5:compile [INFO] +- org.apache.camel:camel-test-spring:jar:2.11.0:test [INFO] | +- org.apache.camel:camel-test:jar:2.11.0:test (version managed from 2.11.0) [INFO] | +- org.apache.camel:camel-spring:jar:2.11.0:test (version managed from 2.11.0) [INFO] | | +- org.springframework:spring-context:jar:3.1.4.RELEASE:test (version managed from 3.1.4.RELEASE) [INFO] | | | +- org.springframework:spring-beans:jar:3.1.4.RELEASE:test (version managed from 3.1.4.RELEASE) [INFO] | | | +- org.springframework:spring-core:jar:3.1.4.RELEASE:test (version managed from 3.1.4.RELEASE) [INFO] | | | | \- commons-logging:commons-logging:jar:1.1.2:test (version managed from 1.1.1) [INFO] | | | +- org.springframework:spring-expression:jar:3.1.4.RELEASE:test (version managed from 3.1.4.RELEASE) [INFO] | | | \- org.springframework:spring-asm:jar:3.1.4.RELEASE:test [INFO] | | +- org.springframework:spring-aop:jar:3.1.4.RELEASE:test (version managed from 3.1.4.RELEASE) [INFO] | | | \- aopalliance:aopalliance:jar:1.0:test [INFO] | | \- org.springframework:spring-tx:jar:3.1.4.RELEASE:test (version managed from 3.1.4.RELEASE) [INFO] | \- org.springframework:spring-test:jar:3.1.4.RELEASE:test (version managed from 3.1.4.RELEASE) [INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.5:test [INFO] | \- log4j:log4j:jar:1.2.17:test (version managed from 1.2.17) [INFO] \- junit:junit:jar:4.11:test [INFO]\- org.hamcrest:hamcrest-core:jar:1.3:test Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html https://www.linkedin.com/pub/christian-mueller/11/551/642 On Wed, Aug 7, 2013 at 1:51 PM, vkarkhanis vkarkha...@gmail.com wrote: Hello, We have a simple scenario of reading a CSV file and persisting the records into database. We have following route configured for the same: routeContext id=persistIRDCF1 xmlns=http://camel.apache.org/schema/spring; route id=IRD_CF1_LN_FILE_BATCH from uri=file://C://Temp//test.csv/ split streaming=true parallelProcessing=true tokenize token=\n group=2/ unmarshal csv/ /unmarshal /split to uri= sql:INSERT INTO mytable (name, height, comments) VALUES (#, #, #)?dataSourceRef=tsyoneDatasource/ /route /routeContext We get following error while executing: Exception in thread main java.lang.NoClassDefFoundError: org/apache/commons/csv/writer/CSVConfig at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethod(Class.java:1935) at org.springframework.core.LocalVariableTableParameterNameDiscoverer$LocalVariableTableVisitor.resolveMember(LocalVariableTableParameterNameDiscoverer.java:236) at org.springframework.core.LocalVariableTableParameterNameDiscoverer$LocalVariableTableVisitor.visitEnd(LocalVariableTableParameterNameDiscoverer.java:219) at org.springframework.asm.ClassReader.accept(Unknown Source) at org.springframework.asm.ClassReader.accept(Unknown Source) From what we read, we should be including camel-csv.jar file in classpath to get this working. We could check that the camel-csv jar is correctly added to the classpath. We are using camel 2.11.0 version. Can you please advise if we are missing something here. Thank you, Regards vkarkhanis -- View this message in context: http://camel.465427.n5.nabble.com/Using-camel-route-for-parsing-a-csv-file-tp5736910.html Sent from the Camel - Users mailing list archive at Nabble.com.
smtp option contentType=text/html has no effect
Hello folks! We are using Camel 2.10.4. Before sending an email I create the html email message via Apache Velocity. The smtp component has the option contentType and that's why I have set it to text/html. However this configuration has no effect and I receive the email as plain text. After I have explicit changed the exchange header Exchange.CONTENT_TYPE to text/html it is working. Has anybody the knowledge why? Cheers Hilderich -- View this message in context: http://camel.465427.n5.nabble.com/smtp-option-contentType-text-html-has-no-effect-tp5736951.html Sent from the Camel - Users mailing list archive at Nabble.com.
Creating then starting a JMS consumer around another component
We are interested in Camel but have a specific startup sequence that we need to follow: 1) Open a JMS topic consumer for our updates, but, do not get any of the messages. 2) Query our database and build a state of the world 3) Start to get the update messages from the consumer we opened We cannot adopt 2, 1, 3, as during the time we are done with our query but are still constructing the state of the world, we might miss an update. 1, 3, 2, is also a problem as an update could present an object which our state of the world subsequently tries to build, resulting in a duplicate. We could endeavor to handle this duplicate, but it is powerful to load the bulk of our data in the state of the world phase and demand absolutely no exceptions. What we have currently implemented can also result in duplicates. The state of the world might contain an object which an update then subsequently provides, but in this case we merely reject just one update, as opposed to having an issue with the much more significant state of the world operation. How can we achieve 1, 2, 3 using Camel? The difficulty that I see is that our consumer must be receiving messages, however, it must not consume them until the state of the world completes. Thanks for your time. -- View this message in context: http://camel.465427.n5.nabble.com/Creating-then-starting-a-JMS-consumer-around-another-component-tp5736955.html Sent from the Camel - Users mailing list archive at Nabble.com.
camel-rabbitmq producer is not including the body
Trying to consume from rabbitmq using the camel-rabbitmq component and the problem is the body of the message is not being passed down the line. Debugging and looking at the source, I see that in RabbitMQConsumer.RabbitConsumer.handleDelivery that the body is being passed into the method, but nothing is done with that parameter. An exchange is created from the envelope in RabbitMQEndPoint.createRabbitExchange, that contains a DefaultMessage instance for the in, but the only things set on the message are the routing key, exchange name, and delivery tag headers. The body of the message is not set and is therefore null. -- View this message in context: http://camel.465427.n5.nabble.com/camel-rabbitmq-producer-is-not-including-the-body-tp5736952.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Creating then starting a JMS consumer around another component
Hi, Why isn't 2,1,3 possible? Why not setup your consumer before you start up your camel context? On Wed, Aug 7, 2013 at 7:22 PM, markgize mark.gizejew...@pimco.com wrote: We are interested in Camel but have a specific startup sequence that we need to follow: 1) Open a JMS topic consumer for our updates, but, do not get any of the messages. 2) Query our database and build a state of the world 3) Start to get the update messages from the consumer we opened We cannot adopt 2, 1, 3, as during the time we are done with our query but are still constructing the state of the world, we might miss an update. 1, 3, 2, is also a problem as an update could present an object which our state of the world subsequently tries to build, resulting in a duplicate. We could endeavor to handle this duplicate, but it is powerful to load the bulk of our data in the state of the world phase and demand absolutely no exceptions. What we have currently implemented can also result in duplicates. The state of the world might contain an object which an update then subsequently provides, but in this case we merely reject just one update, as opposed to having an issue with the much more significant state of the world operation. How can we achieve 1, 2, 3 using Camel? The difficulty that I see is that our consumer must be receiving messages, however, it must not consume them until the state of the world completes. Thanks for your time. -- View this message in context: http://camel.465427.n5.nabble.com/Creating-then-starting-a-JMS-consumer-around-another-component-tp5736955.html Sent from the Camel - Users mailing list archive at Nabble.com.
Question about ZooKeeper APIs
Hi all, I can see ZooKeeper APIs are available in Camel. Is there any good examples for the ZooKeeper APIs? thanks Lei -- View this message in context: http://camel.465427.n5.nabble.com/Question-about-ZooKeeper-APIs-tp5736960.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-rabbitmq producer is not including the body
Hi, Thanks for reporting it. I just filled a JIRA[1] and committed a fix for it. [1]https://issues.apache.org/jira/browse/CAMEL-6617 -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Thursday, August 8, 2013 at 4:44 AM, dalewking wrote: Trying to consume from rabbitmq using the camel-rabbitmq component and the problem is the body of the message is not being passed down the line. Debugging and looking at the source, I see that in RabbitMQConsumer.RabbitConsumer.handleDelivery that the body is being passed into the method, but nothing is done with that parameter. An exchange is created from the envelope in RabbitMQEndPoint.createRabbitExchange, that contains a DefaultMessage instance for the in, but the only things set on the message are the routing key, exchange name, and delivery tag headers. The body of the message is not set and is therefore null. -- View this message in context: http://camel.465427.n5.nabble.com/camel-rabbitmq-producer-is-not-including-the-body-tp5736952.html Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
Re: Question about ZooKeeper APIs
Hi, Did you have a chance to check out the Camel-ZooKeeper document[1]? [1]http://camel.apache.org/zookeeper.html -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Thursday, August 8, 2013 at 10:16 AM, bonnahu wrote: Hi all, I can see ZooKeeper APIs are available in Camel. Is there any good examples for the ZooKeeper APIs? thanks Lei -- View this message in context: http://camel.465427.n5.nabble.com/Question-about-ZooKeeper-APIs-tp5736960.html Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
Re: Question about ZooKeeper APIs
May want to also peek at the unit tests: https://git-wip-us.apache.org/repos/asf?p=camel.git;a=tree;f=components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper;h=633ed267f43b43f3d46789236ec5583f4ea7be93;hb=HEAD On Wed, Aug 7, 2013 at 7:54 PM, Willem jiang willem.ji...@gmail.com wrote: Hi, Did you have a chance to check out the Camel-ZooKeeper document[1]? [1]http://camel.apache.org/zookeeper.html -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Thursday, August 8, 2013 at 10:16 AM, bonnahu wrote: Hi all, I can see ZooKeeper APIs are available in Camel. Is there any good examples for the ZooKeeper APIs? thanks Lei -- View this message in context: http://camel.465427.n5.nabble.com/Question-about-ZooKeeper-APIs-tp5736960.html Sent from the Camel - Users mailing list archive at Nabble.com ( http://Nabble.com). -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta