Re: Instagram Component ?
I'm currently investigating whether to use a 3rd party Java Instagram API or write one from scratch for this component. None that I've found work really well and have an Apache-friendly license. On Sat, Mar 26, 2016 at 1:32 AM, Claus Ibsenwrote: > Hi > > Yeah we do not have such a component. And it would be great to have one. > > We love contributions > http://camel.apache.org/contributing > > > On Fri, Mar 25, 2016 at 7:49 PM, Matt Sicker wrote: > > No, there isn't an official component, and I don't see any third party > > ones, either. > > > > On 25 March 2016 at 13:40, Mark wrote: > > > >> I'm wondering if there is an Instagram component in Camel. If not I'd > like > >> to start work on one and can submit a pull request back to the baseline. > >> > > > > > > > > -- > > Matt Sicker > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 >
[CAMEL-JETTY] How to manage filter-mapping?
Hi, I'm trying to put the "servlet-filter" to the "camel-jetty" (version 2.17.0). At the moment I config the route as the following: - from("jetty:http://0.0.0.0:8080/myweb; + "?matchOnUriPrefix=true&" + "filtersRef=my-filter&" + "filterInit.key1=value1") Everything work great, the filter applies for "/myweb/*". Anyhow I would like to apply the filter only for some path, e.g. "/myweb/foo/*". Regarding to the "web.xml", we are able to set the 'filter-mapping' by providing the 'url-pattern', e.g. my-filter /foo/* I'm not sure if there is any configuration via the 'camel-jetty' or not. Could you please help to advise further? -- Best Regards, Charlee Ch.
Re: Camel JMS, what is a "task" in maxMessagesPerTask?
No - it's not tied to commitsize - it's for scaling up/down the threadpool / how long to keep threads sticking around for processing: http://docs.spring.io/autorepo/docs/spring-framework/2.5.x/api/org/springframework/jms/listener/DefaultMessageListenerContainer.html#setMaxMessagesPerTask(int) http://bsnyderblog.blogspot.no/2010/05/tuning-jms-message-consumption-in.html 2016-03-27 17:54 GMT+02:00 Vanshul.Chawla: > Its max number of message processed in one task. Ie max messages pulled from > queue before MQ commit happens which means one transaction commit for MQ. > > -Original Message- > From: raffi [mailto:raffi.onj...@gmail.com] > Sent: Sunday, March 27, 2016 10:49 AM > To: users@camel.apache.org > Subject: Re: Camel JMS, what is a "task" in maxMessagesPerTask? > > Ahh, ok, thanks Claus. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-JMS-what-is-a-task-in-maxMessagesPerTask-tp5779819p5779822.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- -- David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
Bean properties/vaargs
I have a bean in my blueprint that looks like this: ... I'd like that to be a bit terser. I'm sure there -- View this message in context: http://camel.465427.n5.nabble.com/Bean-properties-vaargs-tp5779827.html Sent from the Camel - Users mailing list archive at Nabble.com.
RE: Camel JMS, what is a "task" in maxMessagesPerTask?
Its max number of message processed in one task. Ie max messages pulled from queue before MQ commit happens which means one transaction commit for MQ. -Original Message- From: raffi [mailto:raffi.onj...@gmail.com] Sent: Sunday, March 27, 2016 10:49 AM To: users@camel.apache.org Subject: Re: Camel JMS, what is a "task" in maxMessagesPerTask? Ahh, ok, thanks Claus. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-what-is-a-task-in-maxMessagesPerTask-tp5779819p5779822.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel JMS, what is a "task" in maxMessagesPerTask?
Ahh, ok, thanks Claus. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-what-is-a-task-in-maxMessagesPerTask-tp5779819p5779822.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel JMS, what is a "task" in maxMessagesPerTask?
Its a spring jms option, so you can find more details what it mean at spring jms you can google for spring jms maxMessagesPerTask and find it in their docs somewhere On Sun, Mar 27, 2016 at 4:51 PM, raffiwrote: > While not explicitly mentioned in Camel JMS docs, I'm assuming "task" is a > thread, so *maxMessagesPerTask=5* limits the number of messages on which a > thread can operate; is that correct? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-JMS-what-is-a-task-in-maxMessagesPerTask-tp5779819.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Camel JMS, what is a "task" in maxMessagesPerTask?
While not explicitly mentioned in Camel JMS docs, I'm assuming "task" is a thread, so *maxMessagesPerTask=5* limits the number of messages on which a thread can operate; is that correct? -- View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-what-is-a-task-in-maxMessagesPerTask-tp5779819.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel route ACtiveMQ to ActiveMq has low transactions per second
It's slow because you're creating/destroying connections repeatedly; you need pooling: PooledConnectionFactory connectionFactory = new PooledConnectionFactory("vm://mybroker?broker.persistent=false"); CamelContext context = new DefaultCamelContext(); context.addComponent( "test-jms2", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory)); context.addComponent( "test-jms" JmsComponent.jmsComponentAutoAcknowledge(connectionFactory)); Also, don't use *threads() * with /concurrentConsumer/, use the latter only. context.addRoutes(new RouteBuilder() { @Override public void configure() { from( "test-jms:queue:test.queue?concurrentConsumers=5=false") .to("test-jms2:queue:test2.queue"); } }); I was able to send thousands of messages in just a few seconds with those optimizations alone, Hope it helps Raffi -- View this message in context: http://camel.465427.n5.nabble.com/Camel-route-ACtiveMQ-to-ActiveMq-has-low-transactions-per-second-tp5777819p5779820.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel Context Auto Configuration
Awesome. Thanks a lot. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Context-Auto-Configuration-tp5779752p5779818.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel Context Auto Configuration
Its called camel.springboot.mainRunController and I think spring allow dashes: camel.springboot.main-run-controller The prefix is "camel.springboot". https://github.com/apache/camel/blob/master/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java#L20 On Sun, Mar 27, 2016 at 2:54 PM, geoHeilwrote: > Unfortunately working along I realized that still, there is something wrong > with my approach. Here is a minimum example: > https://github.com/geoHeil/camelQuestion but for me the context seems to > *not* keep running. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-Context-Auto-Configuration-tp5779752p5779813.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Re: Camel Properties Spring Boot Unit test not found
###Updated-version## Hi sure, here is a minimum example: https://github.com/geoHeil/camelQuestion Unfortunately, putting together this minimum example revealed a couple of more issues with my application. The good thing is: I could verify that indeed if I use the camel-spring-testrunner and appropriate setup it works. Nonetheless, this question remains: Is stronger coupling e.g. using {{camelProperty}} better compared to using a Spring property. The bad thing is: why does camel not delete the files as specified in the tear down method? why is the null folder and .camel created and original csv deleted? And why is my camel context not the property camel: mainRunController: true to keep the application running? (https://github.com/apache/camel/blob/master/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java#L63) -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Properties-Spring-Boot-Unit-test-not-found-tp5779765p5779814.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel Context Auto Configuration
Unfortunately working along I realized that still, there is something wrong with my approach. Here is a minimum example: https://github.com/geoHeil/camelQuestion but for me the context seems to *not* keep running. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Context-Auto-Configuration-tp5779752p5779813.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel Properties Spring Boot Unit test not found
Hi sure, here is a minimum example: https://github.com/geoHeil/camelQuestion Unfortunately, it only works to display the code :( as it does not find some input files. (However this works in my real application). I could verify that indeed if I use the camel-spring-testrunner and appropriate setup it works. For me only this question remains: Is stronger coupling e.g. using {{camelProperty}} better compared to using a Spring property. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Properties-Spring-Boot-Unit-test-not-found-tp5779765p5779799.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel Properties Spring Boot Unit test not found
Maybe you can put a project on github or attach as a .zip to an email or something - then its easier to look. And write a readme file explaining how to run and what is wrong. eg do it work fine without testing and is it only in an unit test the property is not resolved ? On Sat, Mar 26, 2016 at 6:17 PM, Georg Heilerwrote: > Regarding your question: > > What happens if you have a application.yml file and put the property in > there? > > Well the my-property is set like: > > myProperty: someValue > > in the application.yml as well as the application-test.yml > > Trying to access the property like: > > @Value(„${myProperty}") > private String myProperty; > > Works. > But in the test-case I try to create my route-builder like: > > @Override > public RouteBuilder createRouteBuilder() { > LOG.info(„MyProperty: #" + myProperty); > return new MyRouteBuilder(); > } > > > Whereas MyRoute Builder is implemented as follows: > > @Component > public class MyRouteBuilder extends RouteBuilder { > >private static final Logger LOGGER = > Logger.getLogger(MyRouteBuilder.class); > >@Override >public void configure() throws Exception { > // REGISTER ROUTE TO IMPORT CSV > from("file:{{myProperty}}/?noop=true") // FILE PATH FROM PROPERTIES > .log(LoggingLevel.INFO, "PROCESSING FILE ${file:name}...") > > > And in this freshly instantiated class the property does not seem to be > available any more in case the instantiation happens in the Unit test. > > A different value (used to connect to a message queue) could be read without > problems from a @Bean annotated configuration class. > > Am 26.03.2016 um 16:59 schrieb Claus Ibsen : > > What happens if you have a application.yml file and put the property in > there? > > camel-spring-boot uses spring's property resolver so its a bit strange > if spring can find it and not camel. What if you use that key in a > spring @Bean is spring able to find it ? > > On Sat, Mar 26, 2016 at 3:26 PM, geoHeil > wrote: > > Hi, > > my Camel properties work fine during normal execution of the software. > However, when I execute it via JUnit the properties cannot be read anymore. > As this is a spring boot application I stored the properties in the > application.yml properties file. > > This is the error-message: > Property with key [myProperty] not found in properties from text: > file:{{myProperty}}/?noop=true > > The following annotations are used for the test class: > @RunWith(SpringJUnit4ClassRunner.class) > @SpringApplicationConfiguration(classes = MyClass.class) > @ActiveProfiles("test") > and the properties are defined in src/main/resources/application-test.yml > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-Properties-Spring-Boot-Unit-test-not-found-tp5779765.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 > > -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Customizing Http Response code
Hi I developed a REST Service using Camel.I want to change Response code 200 to User defined Response code. Requirement :Whenever Validation failed Response code is 404 and Response Message is BadRequest Regards Sumanth -- View this message in context: http://camel.465427.n5.nabble.com/Customizing-Http-Response-code-tp5779795.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel Properties Spring Boot Unit test not found
Regarding your question: > What happens if you have a application.yml file and put the property in there? Well the my-property is set like: myProperty: someValue in the application.yml as well as the application-test.yml Trying to access the property like: @Value(„${myProperty}") private String myProperty; Works. But in the test-case I try to create my route-builder like: @Override public RouteBuilder createRouteBuilder() { LOG.info(„MyProperty: #" + myProperty); return new MyRouteBuilder(); } Whereas MyRoute Builder is implemented as follows: @Component public class MyRouteBuilder extends RouteBuilder { private static final Logger LOGGER = Logger.getLogger(MyRouteBuilder.class); @Override public void configure() throws Exception { // REGISTER ROUTE TO IMPORT CSV from("file:{{myProperty}}/?noop=true") // FILE PATH FROM PROPERTIES .log(LoggingLevel.INFO, "PROCESSING FILE ${file:name}...") And in this freshly instantiated class the property does not seem to be available any more in case the instantiation happens in the Unit test. A different value (used to connect to a message queue) could be read without problems from a @Bean annotated configuration class. > Am 26.03.2016 um 16:59 schrieb Claus Ibsen: > > What happens if you have a application.yml file and put the property in there? > > camel-spring-boot uses spring's property resolver so its a bit strange > if spring can find it and not camel. What if you use that key in a > spring @Bean is spring able to find it ? > > On Sat, Mar 26, 2016 at 3:26 PM, geoHeil > wrote: >> Hi, >> >> my Camel properties work fine during normal execution of the software. >> However, when I execute it via JUnit the properties cannot be read anymore. >> As this is a spring boot application I stored the properties in the >> application.yml properties file. >> >> This is the error-message: >> Property with key [myProperty] not found in properties from text: >> file:{{myProperty}}/?noop=true >> >> The following annotations are used for the test class: >> @RunWith(SpringJUnit4ClassRunner.class) >> @SpringApplicationConfiguration(classes = MyClass.class) >> @ActiveProfiles("test") >> and the properties are defined in src/main/resources/application-test.yml >> >> >> >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/Camel-Properties-Spring-Boot-Unit-test-not-found-tp5779765.html >> Sent from the Camel - Users mailing list archive at Nabble.com. > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 signature.asc Description: Message signed with OpenPGP using GPGMail