Too many connection in TIME_WAIT when tempfilename is set in the FTP producer URI.
So many connections remain in TIME_WAIT state while configuring a FTP producer route with tempfilename property in FTP producer. I am using *Producertemplate.sendBodyAndHeader(producerURI, Exchange.FILE_NAME, fileName)* to write file to destination. *Producer URI* : ftp://USER@MACHINE_ADDRESS//?password=RAW(PASSWORD)binary=true*passiveMode=false*delete=truepollStrategy=#ConsumerPollStrategy*disconnect=false**tempFileName=/temp/hello.tmp*initialDelay=10throwExceptionOnConnectFailed=truereconnectDelay=10maximumReconnectAttempts=0maxMessagesPerPoll=100readLock=changedreadLockCheckInterval=500readLockMinLength=1sendEmptyMessageWhenIdle=true *fileName*: file.tmp. We are writing ~ 2000 files . First files are written to temp directory then moved to destination. Connections opened for tempfiles are not re used to write temporary files and we run out of connection after writing 1000 files. Route resumes once connections are released. Is there a way we can reuse connection to write temporary files also. -- View this message in context: http://camel.465427.n5.nabble.com/Too-many-connection-in-TIME-WAIT-when-tempfilename-is-set-in-the-FTP-producer-URI-tp5768017.html Sent from the Camel - Users mailing list archive at Nabble.com.
RE: JMS MQ performance improvement
Hello, you could try followign things 1. As property name=transactionManager ref=wmqTransactionManager / property name=transacted value=false / as transacted is false you can try removing transactionManager which is being set 2. for property name=cacheLevelName value=CACHE_AUTO / try setting the cacheLevelName to CACHE_CONSUMER or CACHE_SESSION for higher throughput 3. Enable asyncConsumer if async processing of exchanges is acceptible Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/JMS-MQ-performance-improvement-tp5767963p5768016.html Sent from the Camel - Users mailing list archive at Nabble.com.
Is there a tools to convert java dsl to xml ?
hi team, Is there a tools to convert java dsl to xml ? Is every java dsl code have a equal xml counterpart? When I am reading the camel document's , there are many snippets code that writen by java dsl . As a new user , sometimes I have to use xml instead of java dsl . In fact , I want to know how could I convert the below code to xml from(direct:start) .setHeader(decisionSlip).method(OrderProcessorBean.class, calculateRoute) .routingSlip(decisionSlip); thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Is-there-a-tools-to-convert-java-dsl-to-xml-tp5768015.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: XSL stylesheet from database
I might be wrong, but recepientList EIP deals just with dynamic uri construction (i.e. dynamic endpoint selection, uri parameters setting etc.), isn't it? As to my question, I would like to know, is there any way to make xslt endpoint use xsl stylesheet body (not just filename, but body itself as String or DOM) not only from file or uri location, but from ${body} of another endpoint or from some header (like CamelVelocityTemplate), or something else?.. For now I see the only appropriate way in creating another route started from http endpoint and returning ${body} with xsl inside... -- View this message in context: http://camel.465427.n5.nabble.com/XSL-stylesheet-from-database-tp5768011p5768018.html Sent from the Camel - Users mailing list archive at Nabble.com.
XSL stylesheet from database
Hello! Could you show me the most convenient way of using XSL stylesheets loaded from database (or other dynamic sources) with xslt endpoint? I have already noted technique of using http endpoint, but can it be the only way? Thank you in advance! -- View this message in context: http://camel.465427.n5.nabble.com/XSL-stylesheet-from-database-tp5768011.html Sent from the Camel - Users mailing list archive at Nabble.com.
Transactional Client in Camel
Hi, Wanted some clarity on the usage of Transactional Client In situation like below route from uri=jms:queue:inputQueue/ transacted ref=required/ log message=Received Message/ to uri=direct:postResponse/ /route route from uri=direct:postResponse/ log message=Processing/ to uri=jms:queue:outputQueue/ /route Considering the above route does the transaction span from the getting the message from the inputQueue till the message is posted on to outputQueue ? and would any issue/exception raised during processing trigger rollback of message to the inputqueue ? Please let me know incase any further details are required Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Transactional-Client-in-Camel-tp5768012.html Sent from the Camel - Users mailing list archive at Nabble.com.
simple language for filters on values of HTTP headers
Hi All, in a camel route starting with a Jetty endpoint, I want to enable gzipping if the input sends the http header: Accept-Encoding: gzip However, the Accept-Encoding may have multiple comma separated values for different encoding accepted, typical it is Accept-Encoding: gzip, deflate As the values are comma separated, I thought about a filter like this to be fine (xml dsl): filter simple'gzip' in ${header[Accept-Encoding]}/simple ... do gizipping ... /filter the problem is that it works with a header value of gzip, deflate but it won't work for a header value for example of compress, deflate, exi, gzip, identity, because the token split by in operator is ' gzip', (note the extra space in front of it. Do you have any suggestion to better handle this dilemma :-) ? FYI I'm reverting to use: filter simple${header[Accept-Encoding]} contains 'gzip'/simple ... do gizipping ... /filter but using in would seem cleaner to me... Thanks, Cristiano
Re: XSL stylesheet from database
Anything you wanna populate on to uri= endpoints can be achieved using recepientList EIP. Check out http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html Cheers Reji - Reji Mathews Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel Jboss Fuse ESB | Mule ESB ) LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a Twitter - reji_mathews -- View this message in context: http://camel.465427.n5.nabble.com/XSL-stylesheet-from-database-tp5768011p5768014.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: deleting jms queue
Hello, Depends on the support provided by the JMS Provider for deleting... for e.g. in AMQ you can use JMX to delete the queue Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/deleting-jms-queue-tp5767981p5768013.html Sent from the Camel - Users mailing list archive at Nabble.com.
Queue and database transaction, rollback?
Hi, I don't understand how this is supposed to work, because it does simply not. onException(StoreDataException.class) .useOriginalMessage() .handled(true) .to(errorQueue) .markRollbackOnly() ; Since it's rollbacking, it rollbacks the message to the incoming queue and not the errorQueue, which reads it again. Chaos. How can this be handled better? I'm deploying in liberty profile, and when I'm committing the message to a queue I want to commit the sql update as well. One of my thoughts were using PROPAGATION_REQUIRES_NEW, so when calling my bean which calls the database, I'm using that inside an own transaction. Which will be the only one which rollbacks, and then I can send the message to the error queue as normal. But when using PROPAGATION_REQUIRES_NEW I get JtaTransactionManager needs a JTA TransactionManager for suspending a transaction: specify the 'transactionManager' or 'transactionManagerName' property. I do not get this error with PROPAGATION_REQUIRED private JmsComponent mqComponentTransacted(InitialContext context, String connectionFactoryJndiName, String userTransactionJndiName) throws JMSException, NamingException { LOG.info(Setting up JmsComponent using jndi lookup); UserTransaction userTransaction = (UserTransaction) context.lookup(userTransactionJndiName); final JtaTransactionManager jtaTransactionManager = new JtaTransactionManager(userTransaction); final ConnectionFactory connectionFactory = (ConnectionFactory) context.lookup(connectionFactoryJndiName); final JmsComponent jmsComponent = JmsComponent.jmsComponentTransacted(connectionFactory, (PlatformTransactionManager) jtaTransactionManager); jmsComponent.setTransacted(false); jmsComponent.setCacheLevel(DefaultMessageListenerContainer.CACHE_NONE); context.bind(userTransaction, userTransaction); context.bind(transactionManager, jtaTransactionManager); SpringTransactionPolicy propReq = new SpringTransactionPolicy(); propReq.setTransactionManager((PlatformTransactionManager) jtaTransactionManager); propReq.setPropagationBehaviorName(PROPAGATION_REQUIRED); context.bind(PROPAGATION_REQUIRED, propReq); SpringTransactionPolicy propReqNew = new SpringTransactionPolicy(); propReqNew.setTransactionManager((PlatformTransactionManager) jtaTransactionManager); propReqNew.setPropagationBehaviorName(PROPAGATION_REQUIRES_NEW); context.bind(PROPAGATION_REQUIRES_NEW, propReqNew); return jmsComponent; } -- View this message in context: http://camel.465427.n5.nabble.com/Queue-and-database-transaction-rollback-tp5768020.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: HeaderFilterStrategy example
Hi You can use an interceptFrom http://camel.apache.org/intercept On Mon, Jun 8, 2015 at 12:09 PM, fliot33 francois.l...@poplidays.com wrote: Hi, I globbaly would like to do this : camelContext ... route from uri=activemq:test/ setHeader headerName=SecretInformationsimple${body}/simple/setHeader setHeader headerName=CamelHttpMethodconstantGET/constant/setHeader setHeader headerName=Acceptsimpletext/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8/simple/setHeader setHeader headerName=Accept-Languagesimplefr,en-US;q=0.8,en;q=0.6,es;q=0.4/simple/setHeader to uri=http://some-nice-remote-api/proc?HeaderFilterStrategy=z.mystrategy.myclass/ transformsimple${header.SecretInformation}/simple/transform to uri=http://advise-passed/ /route /camelContext Can you give me code example of HeaderFilterStrategy to avoid header.SecretInformation to be send to some-nice-remote-api, But reamainging available in the current exchange ? Thanks in advance, Francois -- View this message in context: http://camel.465427.n5.nabble.com/HeaderFilterStrategy-example-tp5767972.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 hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Re: deleting jms queue
Hi Afair temp queues are affilianted with the jms session and automatic deleted by the broker when the session is closed - eg AMQ should do this. On Mon, Jun 8, 2015 at 5:31 PM, Tim Dudgeon tdudgeon...@gmail.com wrote: I'm using a temp JMS queue to return some results. Once I've finished processing I want to delete the queue. What's the best approach? I'm assuming its best to manually generate the temp queue at the start and then manually delete it when finished. I notice I could use JmsTemporaryQueueEndpoint [1] which I know how to get hold of, and that can give me the javax.jms.TemporaryQueue, which I can then delete(), but how to get a handle on the javax.jms.Session session? Or is there a better way? Thanks Tim [1] http://camel.apache.org/maven/current/camel-jms/apidocs/org/apache/camel/component/jms/JmsTemporaryQueueEndpoint.html [2] http://docs.oracle.com/javaee/7/api/javax/jms/TemporaryQueue.html -- 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 hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Re: Manage CorrelationID using JMS endpoint options
Can you check camel jms docs for option called useMessageIDAsCorrelationID. Am not sure if this might serve the purpose. Cheers Reji On Tue, Jun 9, 2015 at 10:35 AM, Gnanaguru S gnanagu...@gmail.com wrote: Hi All, I have a camel route, which takes messages from a jms queue and further sends it down to a splitter. Further the responses are aggregated and sent back to a response queue. (of course response queue is controller by the client in this scenario ) In this scenario I had to manually handle client's correlation id, because after aggregation the original correlation id will be obvious lost. Can we add a jms option to handle this scenario ? At the moment I am having this logic which manually reverts the original correlation id. route id=test-gateway-jms-route from uri=jms:queue:Gateway-Queue?replyToDeliveryPersistent=false / setProperty propertyName=parkedClientCorrelationIdsimple${headers.JMSCorrelationID}/simple/setProperty removeHeader headerName=JMSCorrelationID / to uri=direct:downstream-routes / setHeader headerName=JMSCorrelationIDsimple${property.parkedClientCorrelationId}/simple/setHeader removeProperty propertyName=parkedClientCorrelationId / /route Cheers Guru @tallguru -- View this message in context: http://camel.465427.n5.nabble.com/Manage-CorrelationID-using-JMS-endpoint-options-tp5767995.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: deleting jms queue
Well, maybe I'm wrong to call it a temp queue. This is not an InOut pattern. Its InOnly followed (potentially much later) by a response to a private queue (specified by JmsReplyTo header) that is InOnly and handled by a different route/consumer. Once processing is complete I need the queue to be deleted. Tim On 09/06/2015 07:07, Claus Ibsen wrote: Hi Afair temp queues are affilianted with the jms session and automatic deleted by the broker when the session is closed - eg AMQ should do this. On Mon, Jun 8, 2015 at 5:31 PM, Tim Dudgeon tdudgeon...@gmail.com wrote: I'm using a temp JMS queue to return some results. Once I've finished processing I want to delete the queue. What's the best approach? I'm assuming its best to manually generate the temp queue at the start and then manually delete it when finished. I notice I could use JmsTemporaryQueueEndpoint [1] which I know how to get hold of, and that can give me the javax.jms.TemporaryQueue, which I can then delete(), but how to get a handle on the javax.jms.Session session? Or is there a better way? Thanks Tim [1] http://camel.apache.org/maven/current/camel-jms/apidocs/org/apache/camel/component/jms/JmsTemporaryQueueEndpoint.html [2] http://docs.oracle.com/javaee/7/api/javax/jms/TemporaryQueue.html
Re: deleting jms queue
Yes then you should use regular queues. On Tue, Jun 9, 2015 at 8:47 AM, Tim Dudgeon tdudgeon...@gmail.com wrote: Well, maybe I'm wrong to call it a temp queue. This is not an InOut pattern. Its InOnly followed (potentially much later) by a response to a private queue (specified by JmsReplyTo header) that is InOnly and handled by a different route/consumer. Once processing is complete I need the queue to be deleted. Tim On 09/06/2015 07:07, Claus Ibsen wrote: Hi Afair temp queues are affilianted with the jms session and automatic deleted by the broker when the session is closed - eg AMQ should do this. On Mon, Jun 8, 2015 at 5:31 PM, Tim Dudgeon tdudgeon...@gmail.com wrote: I'm using a temp JMS queue to return some results. Once I've finished processing I want to delete the queue. What's the best approach? I'm assuming its best to manually generate the temp queue at the start and then manually delete it when finished. I notice I could use JmsTemporaryQueueEndpoint [1] which I know how to get hold of, and that can give me the javax.jms.TemporaryQueue, which I can then delete(), but how to get a handle on the javax.jms.Session session? Or is there a better way? Thanks Tim [1] http://camel.apache.org/maven/current/camel-jms/apidocs/org/apache/camel/component/jms/JmsTemporaryQueueEndpoint.html [2] http://docs.oracle.com/javaee/7/api/javax/jms/TemporaryQueue.html -- 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 hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Re: deleting jms queue
So back to the question about how to delete them :-) On 09/06/2015 07:54, Claus Ibsen wrote: Yes then you should use regular queues. On Tue, Jun 9, 2015 at 8:47 AM, Tim Dudgeon tdudgeon...@gmail.com wrote: Well, maybe I'm wrong to call it a temp queue. This is not an InOut pattern. Its InOnly followed (potentially much later) by a response to a private queue (specified by JmsReplyTo header) that is InOnly and handled by a different route/consumer. Once processing is complete I need the queue to be deleted. Tim On 09/06/2015 07:07, Claus Ibsen wrote: Hi Afair temp queues are affilianted with the jms session and automatic deleted by the broker when the session is closed - eg AMQ should do this. On Mon, Jun 8, 2015 at 5:31 PM, Tim Dudgeon tdudgeon...@gmail.com wrote: I'm using a temp JMS queue to return some results. Once I've finished processing I want to delete the queue. What's the best approach? I'm assuming its best to manually generate the temp queue at the start and then manually delete it when finished. I notice I could use JmsTemporaryQueueEndpoint [1] which I know how to get hold of, and that can give me the javax.jms.TemporaryQueue, which I can then delete(), but how to get a handle on the javax.jms.Session session? Or is there a better way? Thanks Tim [1] http://camel.apache.org/maven/current/camel-jms/apidocs/org/apache/camel/component/jms/JmsTemporaryQueueEndpoint.html [2] http://docs.oracle.com/javaee/7/api/javax/jms/TemporaryQueue.html
Re: https4 2.15.2 not recognizing my httpClientConfigurer endpoint option
I just checked the code of your HttpClientconfigurer, you didn’t set the httpClientBuilder with the SSLConnectionSocketFactory instance that you just created. -- 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 6, 2015 at 5:48:31 AM, jspyeatt (john.pye...@singlewire.com) wrote: Like several similar posts I've seen I need to allow self-signed certs for https4 (2.15.2). Mine isn't working. I've created an implementation of HttpClientConfigurer that allows any host/cert. Below is the implementation of configureHttpClient(). @Override public void configureHttpClient(HttpClientBuilder httpClientBuilder) { log.debug(configureHttpClient()); try { SSLContextBuilder builder = new SSLContextBuilder(); builder.loadTrustMaterial(null, new TrustSelfSignedStrategy() { @Override * public boolean isTrusted(X509Certificate[] a, String b) throws CertificateException { log.debug(isTrusted() returns true); return true; }* }); SSLContext sslContext = builder.build(); SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext, new TrustEverythingHostnameVerifier()); } catch (Exception e) { log.error(e,e); throw new IllegalStateException(Unable to configure TrustingHttpClientConfigurer, e); } } Then in an implementation of CameltestSupport I've overridden createRegistry(). @Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry jndi = super.createRegistry(); log.info(createRegistry()); *jndi.bind(MyConfigurer, new TrustingHttpClientConfigurer());* Object o = jndi.lookup(TrustingHttpClientConfigurer.HTTP_CLIENT_CONFIGURER); log.debug(object type: + o.getClass().getCanonicalName()); return jndi; } Then in my createRouteBuilder() it contains... return new RouteBuilder() { public void configure() { log.debug(CONFIGURE); * HttpComponent httpComponent = context.getComponent(https4, HttpComponent.class); httpComponent.setHttpClientConfigurer(new TrustingHttpClientConfigurer()); log.info(CCC + context.getRegistry().lookupByName(MyConfigurer)); from(direct:start).transform(simple(FRED)).to(https4://172.30.253.94:8444/services?httpClientConfigurer=#MyConfigurer;* } }; public void testSimple() throws Exception { HttpComponent comp = template.getCamelContext().getComponent(https4, HttpComponent.class); * log.info(DDD + comp.getHttpClientConfigurer().getClass().getCanonicalName());* template.sendBody(direct:start, FRED); } When the test runs I do get *DDD com.singlewire.monte.eh.config.TrustingHttpClientConfigurer* which is what I would expect. However test is failing with the obligatory javax.net.ssl.SSLHandshakeException. This is what I would expect given that the component isn't calling my version of isTrusted(X509Certificate[] a, String b) created during TrustingHttpClientConfigurer.configureHttpClient(). I know this because I never see the debug message indicating that it was called. So it's as if during execution of my route the configurator is being ignored. I've tried ?httpClientConfigurer=#MyConfigurer I've tried ?httpClientConfigurer=MyConfigurer I've tried forcing things like this. HttpComponent httpComponent = context.getComponent(https4, HttpComponent.class); httpComponent.setHttpClientConfigurer(new TrustingHttpClientConfigurer()); Nothing seems to work. Any guidance would be greatly appreciated. -- View this message in context: http://camel.465427.n5.nabble.com/https4-2-15-2-not-recognizing-my-httpClientConfigurer-endpoint-option-tp5767922.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Is there a tools to convert java dsl to xml ?
I'm the opposite. I avoid XML, and use Java DSL exclusively. I really like the way it reads, and easy to test using camel test On Tue, Jun 9, 2015 at 10:48 AM Dan Moore dmo...@katasi.com wrote: I also am a new user and tend to like XML. Maybe that will change as I get used to Camel. I don't know of any automated way, but you can get edit access to camel and make the changes yourself: http://camel.apache.org/how-do-i-edit-the-website.html Dan On Tue, Jun 9, 2015 at 3:11 AM, cloud cl...@domolo.com wrote: hi team, Is there a tools to convert java dsl to xml ? Is every java dsl code have a equal xml counterpart? When I am reading the camel document's , there are many snippets code that writen by java dsl . As a new user , sometimes I have to use xml instead of java dsl . In fact , I want to know how could I convert the below code to xml from(direct:start) .setHeader(decisionSlip).method(OrderProcessorBean.class, calculateRoute) .routingSlip(decisionSlip); thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Is-there-a-tools-to-convert-java-dsl-to-xml-tp5768015.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Is there a tools to convert java dsl to xml ?
Hi, cloud wrote Is there a tools to convert java dsl to xml ? No, although you can see an XML representation of a route defined in any DSL (Java, XML, Groovy, Scala etc.) by calling a method called dumpRouteAsXml() when looking at it though JMX. cloud wrote Is every java dsl code have a equal xml counterpart? When I am reading the camel document's , there are many snippets code that writen by java dsl . As a new user , sometimes I have to use xml instead of java dsl . Yes it does. A good reference (shameless self-promotion) is the Apache Camel Developer's Cookbook - it contains examples of every DSL element in both the Java and XML DSLs. cloud wrote In fact , I want to know how could I convert the below code to xml from(direct:start) .setHeader(decisionSlip).method(OrderProcessorBean.class, calculateRoute) .routingSlip(decisionSlip); from uri=direct:start setHeader name=decisionSlip method ref=myOrderProcessorBean method=calculateRoute/ /setHeader routingSlip headerdecisionSlip/header /routingSlip Hope that helps. Jakub -- View this message in context: http://camel.465427.n5.nabble.com/Is-there-a-tools-to-convert-java-dsl-to-xml-tp5768015p5768023.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Is there a tools to convert java dsl to xml ?
I should also say that there is a runtime tool that allows you to see the XML of running routes - HawtIO (http://hawt.io). Jakub -- View this message in context: http://camel.465427.n5.nabble.com/Is-there-a-tools-to-convert-java-dsl-to-xml-tp5768015p5768024.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Is there a tools to convert java dsl to xml ?
I also am a new user and tend to like XML. Maybe that will change as I get used to Camel. I don't know of any automated way, but you can get edit access to camel and make the changes yourself: http://camel.apache.org/how-do-i-edit-the-website.html Dan On Tue, Jun 9, 2015 at 3:11 AM, cloud cl...@domolo.com wrote: hi team, Is there a tools to convert java dsl to xml ? Is every java dsl code have a equal xml counterpart? When I am reading the camel document's , there are many snippets code that writen by java dsl . As a new user , sometimes I have to use xml instead of java dsl . In fact , I want to know how could I convert the below code to xml from(direct:start) .setHeader(decisionSlip).method(OrderProcessorBean.class, calculateRoute) .routingSlip(decisionSlip); thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Is-there-a-tools-to-convert-java-dsl-to-xml-tp5768015.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Is there a tools to convert java dsl to xml ?
Hi At runtime you can output any Camel route as xml, there is api on camel context or jmx api to do so. This is what tooling such as the camel commands / hawtio etc uses to visualize the running routes. On Tue, Jun 9, 2015 at 11:11 AM, cloud cl...@domolo.com wrote: hi team, Is there a tools to convert java dsl to xml ? Is every java dsl code have a equal xml counterpart? When I am reading the camel document's , there are many snippets code that writen by java dsl . As a new user , sometimes I have to use xml instead of java dsl . In fact , I want to know how could I convert the below code to xml from(direct:start) .setHeader(decisionSlip).method(OrderProcessorBean.class, calculateRoute) .routingSlip(decisionSlip); thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Is-there-a-tools-to-convert-java-dsl-to-xml-tp5768015.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 hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Re: Camel Restlet
Hi Reji, contactreji wrote Suppose I hit the endpoint with * http://localhost:8181/cars/100?color=redmodel=2015 * with a http GET method, how do I access the * color=red * data in camel exchange. where does it get stored? HTTP consumer endpoints such as Jetty (and I am guessing therefore Restlet as well) put the URI parameters directly into exchange headers. So to access the color, all you have to do is something like: log message=Received request for ${header[color]}/ Jakub -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Restlet-tp5767988p5768022.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: https4 2.15.2 not recognizing my httpClientConfigurer endpoint option
My class that implements HttpClientConfigurer now looks like this from your suggestions: and it still doesn't work. My createRegistry() looks like this: @Override I added a jndi.properties file that looks like this: My uri now looks like this https4://172.30.228.23:8444/InformaCast/RESTServices/V1/Admin/System/ldap/isLdapConfigured?x509HostnameVerifier=*allHostnameVerifier*httpClientConfigurer=*monteTrustingConfigurer* So I thought I now have all of my ducks in a row. But my sslContext created in configureHttpClient() still isn't calling my isTrusted() method. There must be something I'm still missing for the HttpComponent that isn't matching the uri arguments for x509HostnameVerifier and httpClientConfigurer to my registry. I've done a deep dive into the source code of HttpComponent.java with a debugger. when coming out of createEndpoint() in the source code the endpoint variable appears to at least partially be configured correctly. endpoint.endpointUri=https4://172.30.228.23:8444/InformaCast/RESTServices/V1/Admin/System/ldap/isLdapConfigured?httpClientConfigurer=monteTrustingConfigurerx509HostnameVerifier=allHostnameVerifier endpoint.httpClientConfigurer is set to an instance of my class that implements the above configureHttpClient(), TrustingHttpClientConfigurer. endpoint.*component*.httpClientConfigurer is null (which might be OK if it's only used as the default) endpoint.*component*.x509HostnameVerifier is set to BROWSER_COMPATIBLE (this isn't what I want, but again, may just be a default). But I don't see my override value org.apache.http.conn.ssl.AllowAllHostnameVerifier() Now looking at endpoint.camelContext.registry endpoint.camelContext.registry.context.delegate.defaultInitCtx.bindings.0 monteTrustingConfigurer = instance of TrustingHttpClientConfigurer endpoint.camelContext.registry.context.delegate.defaultInitCtx.bindings.1 java.naming.factory.initial = org.apache.camel.util.jndi.CamelInitialContextFactory endpoint.camelContext.registry.context.delegate.defaultInitCtx.bindings.2 allHostnameVerifier = ALLOW_ALL Does anyone see what other little nuggets of knowledge I'm missing? -- View this message in context: http://camel.465427.n5.nabble.com/https4-2-15-2-not-recognizing-my-httpClientConfigurer-endpoint-option-tp5767922p5768038.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Queue and database transaction, rollback?
I guess the easiest would be if it could actually just rollback to a defined DLQ, but how? -- View this message in context: http://camel.465427.n5.nabble.com/Queue-and-database-transaction-rollback-tp5768020p5768021.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: is there a way to change the default properties of a camel component?
One way is to extend the component and the default the configuration value to what you want it to be. Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/is-there-a-way-to-change-the-default-properties-of-a-camel-component-tp5767985p5768045.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Transactional Client in Camel
any one used transactions before with jms ? did that span across routes or was limited to the route in which it was started ? Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Transactional-Client-in-Camel-tp5768012p5768044.html Sent from the Camel - Users mailing list archive at Nabble.com.
Camel FTP2 component throws inputstream closed Exception
I am facing issue when I tried to transfer large files through SFTP. 2015-06-04 05:08:19,200 [ax070.abc.com:22//tmp/]] WARN SftpConsumer - Consumer Consumer[sftp://devs...@appax070.target.com:22//tmp/?fileName=sftp_app_wap_trans_test.xlsxpassword=xxstepwise=falsethrowExceptionOnConnectFailed=true] failed polling endpoint: Endpoint[sftp://a...@appax070.abc.com:22//tmp/?fileName=sftp_app_wap_trans_test.xlsxpassword=xxstepwise=falsethrowExceptionOnConnectFailed=true]. Will try again at next poll. Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - Cannot connect to sftp://devs...@appax070.target.com:22] org.apache.camel.component.file.GenericFileOperationFailedException: Cannot connect to sftp://a...@appax070.abc.com:22 at org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:143) at org.apache.camel.component.file.remote.RemoteFileConsumer.connectIfNecessary(RemoteFileConsumer.java:154) at org.apache.camel.component.file.remote.RemoteFileConsumer.recoverableConnectIfNecessary(RemoteFileConsumer.java:145) at org.apache.camel.component.file.remote.RemoteFileConsumer.prePollCheck(RemoteFileConsumer.java:55) at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:106) at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:781) Caused by: com.jcraft.jsch.JSchException: java.io.IOException: inputstream is closed at com.jcraft.jsch.ChannelSftp.start(ChannelSftp.java:315) at com.jcraft.jsch.Channel.connect(Channel.java:152) at org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:127) ... 14 more Caused by: java.io.IOException: inputstream is closed at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2871) at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2895) at com.jcraft.jsch.ChannelSftp.start(ChannelSftp.java:262) ... 16 more Can anyone help on this issue. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-FTP2-component-throws-inputstream-closed-Exception-tp5768036.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Transactional Client in Camel
You can span routes if it happens synchronously (same thread) that is using direct:endpoint between them 10. jun. 2015 07.31 skrev yogu13 yog...@gmail.com: any one used transactions before with jms ? did that span across routes or was limited to the route in which it was started ? Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Transactional-Client-in-Camel-tp5768012p5768044.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: is there a way to change the default properties of a camel component?
Hi Sometimes a component allows to configure an option on the component level, that endpoints inherited by default. But its not all components that can do that. And to configure options on components you need to create an instance of it, and configure it the usual java / xml bean way. On Wed, Jun 10, 2015 at 5:58 AM, yogu13 yog...@gmail.com wrote: One way is to extend the component and the default the configuration value to what you want it to be. Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/is-there-a-way-to-change-the-default-properties-of-a-camel-component-tp5767985p5768045.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 hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Re: Camel Restlet
Not sure how much this will help, but you can always do this ${headers}. Which will print all the headers available for you ! Cheers Guru -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Restlet-tp5767988p5768043.html Sent from the Camel - Users mailing list archive at Nabble.com.