Re: How to stop a dynamic route

2016-06-03 Thread Quinn Stevenson
You could use the control bus to stop the route ( http://camel.apache.org/controlbus.html ) > On Jun 2, 2016, at 5:06 AM, Daniel Pompa wrote: > > If you see, I have a do-while monitoring the value of the var >

Re: Camel How to dequeue all messages accumulated every X minutes

2016-06-13 Thread Quinn Stevenson
I used something like this in the past for this. Note that I didn’t stop the route in between cycles - I just stopped the loop. return new RouteBuilder() { String routeId = "queue-processor"; int pollTimeout = 100; @Override public void configure() throws Exception {

Re: Onexception and try catch block in camel.

2016-06-13 Thread Quinn Stevenson
I’d suggest you read the “Error Handling” chapter in “Camel in Action” - it covers onException very well. For me, I use onException wherever possible - it allows me to use error handlers and exception policies which make my life much easier, and it separates the error handling logic from the

Re: How to stop a dynamic route

2016-06-13 Thread Quinn Stevenson
I haven’t tested this code, but something like this should do what you’re after from("file://source").routeId( "my-route") .filter( header("CamelBatchComplete").isEqualTo( true ) ) .toF( "controlbus://route?routeId=%s=%s", "my-route", "stop") .end(); Hope that helps >

Re: Generic camel routes - multiple instances

2016-06-13 Thread Quinn Stevenson
Here’s a very simple sample. Given a route builder: public class SimpleBuilder extends RouteBuilder { String timerName = "simple-timer"; int timerPeriod = 5000; int timerDelay = 1000; @Override public void configure() throws Exception { fromF(

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-08 Thread Quinn Stevenson
nalysis of Redhat was >>> correct, it is really a timing issue. You can also increase the chance for >>> the issue if you produce even more messages per second. That increases the >>> probability that a message falls just into the problematic time slice where >>> the consumer

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-08 Thread Quinn Stevenson
Thank You Stephan - that really helps. I ran the project as-is and saw the failure in the “standard” setup on the first run - much easier for me ;-) Then I change transacted to false, and I’ve run it 5-times and it’s succeeded (i.e. not lost messages ). Have you been able to make it drop

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-08 Thread Quinn Stevenson
seconds and then I start the broker again. The > test reconnects and continues. > > Regards > Stephan > > > > > > On Fri, Feb 5, 2016 at 7:40 PM, Quinn Stevenson <qu...@pronoia-solutions.com > <mailto:qu...@pronoia-solutions.com> >> wrote: > >> St

Re: OsgiServiceRegistry caching service references, why?

2016-02-09 Thread Quinn Stevenson
a simple registry in Camel is that simple registry > managed by the OSGi registry? Should it be? I haven't wandered into that > section of code. > > On Tue, Feb 9, 2016 at 9:53 AM, Quinn Stevenson <qu...@pronoia-solutions.com >> wrote: > >> That sounds good to me - I

Re: Redelivery per Endpoint

2016-02-09 Thread Quinn Stevenson
I think what Claus is saying is if you setup a global exception clause, the redelivery will only happen for the failed endpoint. java.lang.Exception That doesn’t give you the option of

Re: CamelBlueprintTestSupport No bean could be found in the registry

2016-02-04 Thread Quinn Stevenson
The syntax of this looks correct. As Brad pointed out, the object references need to be valid when this method is called. There is and example of registering test services in the sample generated by the camel-archetype-blueprint as well. My PR for this is in 2.17-SNAPSHOT version and 2.16.2.

Re: CamelBlueprintTestSupport No bean could be found in the registry

2016-02-08 Thread Quinn Stevenson
I’m a little confused here - asService take the object implementing the interface and the service property key/values - I’m not sure how that could even work as an interface instead of the implementation object. The service interface is provided earlier in the call ( the key in services.put ),

Re: OsgiServiceRegistry caching service references, why?

2016-02-09 Thread Quinn Stevenson
I normally use Blueprint to use OSGi Services. In that case, I should wind up with a Blueprint service proxy. Would using a ServiceTracker with a Blueprint proxy be necessary? I think the Blueprint proxy already does that for me. > On Feb 9, 2016, at 2:31 AM, Claus Ibsen

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-09 Thread Quinn Stevenson
in a transaction we need a >> JTA Tx manager and we set transacted = false to tell Spring NOT to use >> local session transactions. >> >> >> And on top of all that, I learned from section 8) of the blog post that I >> always configure too much connections on the c

Re: OsgiServiceRegistry caching service references, why?

2016-02-09 Thread Quinn Stevenson
y-time to get the service. If it holds > on to the service reference and the service goes away, requests will fail. > > In my view adding service trackers to OsgiServiceRegistry is an improvement > on what exists today, but I would still strongly advise using blueprint > proxies inst

Re: CamelBlueprintTestSupport No bean could be found in the registry

2016-02-05 Thread Quinn Stevenson
I was afraid that might happen - I still haven’t figured out what you can and cannot attach to a message. The sample is available on GitHub : https://github.com/hqstevenson/example-camel-osgi-service-testing.git > On Feb 5, 2016, at 9:45 AM, enigma wrote: > > @Ranx -

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-05 Thread Quinn Stevenson
s this increases the probability of > losing a message? > > Regards > Stephan > > > > > On Thu, Feb 4, 2016 at 7:06 PM, Quinn Stevenson <qu...@pronoia-solutions.com > <mailto:qu...@pronoia-solutions.com> >> wrote: > >> I tested this with

Re: CamelBlueprintTestSupport No bean could be found in the registry

2016-02-05 Thread Quinn Stevenson
Yes - please do. Also - you may need to do a "mvn -DskipTests clean install” before the tests will work (I put this in one of the README.md’s as well). I’ve had to do that quite often when using services exposed from other bundles in tests. > On Feb 5, 2016, at 11:40 AM, enigma

Re: CamelBlueprintTestSupport No bean could be found in the registry

2016-02-04 Thread Quinn Stevenson
I would assume that MyServiceInterface is in one bundle, and you have another bundle with a private class implementing the interface and exposing that implementation as a service. If that is correct, then I normally create a stub for the service in my src/test/java/…../TestStubServiceImpl.java

Re: CamelBlueprintTestSupport No bean could be found in the registry

2016-02-04 Thread Quinn Stevenson
Normally the service interface and the service implementation are in separate bundles. This gives you a lot more flexibility in deployment and testing. That said - here’s a set of projects that demonstrate all three ways - the service implementation embedded with the service interface, the

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-05 Thread Quinn Stevenson
Christian Schneider <ch...@die-schneider.net> > wrote: > > I would use a new issue that just explains what happens without trying to > interpret. We do not yet know what really happens but I hope we can find > out. > > Christian > > 2016-02-03 3:40 GMT+01:00 Quinn Steven

Re: CamelBlueprintTestSupport No bean could be found in the registry

2016-02-05 Thread Quinn Stevenson
I’m glad the examples helped. The asService() helper is correct as written IMO. The test framework isn’t responsible for figuring out what you want to use as your test implementations. I don’t think I’d want to have to deal with tracking down when the framework picked the wrong stub or

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-05 Thread Quinn Stevenson
explicitly > use that reach around when they can't find what they are looking for. It > may be a different bug but ultimately that loophole has to be closed. > > Brad > > On Fri, Feb 5, 2016 at 3:01 PM, Quinn Stevenson <qu...@pronoia-solutions.com >> wrote: > >&

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-04 Thread Quinn Stevenson
ot; > lazyCreateTransactionManager" flag. The JMS transaction manager may not be > defined but it creates one implicitly because of "transacted = true". > > The two "flaws" you mentioned are perhaps an issue. It would be somehow > calming if it is my project

Re: blueprint/nettyencoderfactory

2016-02-12 Thread Quinn Stevenson
The Netty4 encoder/decoder don’t have a “Charset” property - this is controlled by the “encoding” URI parameter. > On Feb 12, 2016, at 5:36 AM, Walzer, Thomas > wrote: > > Hi there, > > I tried (on camel 2.15.2): > > >

Re: ActiveMQ Consuming

2016-02-12 Thread Quinn Stevenson
ion > manager should I use ? Trying with JTATransactionManager for all of them > or use separated JMSTransactionManager for each server ? > > Thanks for anwers, > > Best, > > Stan > > On Thu, Feb 11, 2016 at 5:54 PM, Quinn Stevenson < > qu...@pronoia-solutions.com>

Re: CamelBlueprintTestSupport No bean could be found in the registry

2016-02-09 Thread Quinn Stevenson
Brad - Yes - I think you are right-on. The example I put on GitHub consisted of three bundles - service-interface, service-one and blueprint-consumer. The service-interface bundle exports the Java interface for the service I use throughout the tests. It also contains an implementation of

Re: CamelBlueprintTestSupport No bean could be found in the registry

2016-02-09 Thread Quinn Stevenson
I haven’t had much success at attaching projects either - that’s why I went the GitHub route. You could put a small sample on GitHub ;-) > On Feb 9, 2016, at 11:49 AM, Brad Johnson > wrote: > > I just had a "duh" moment when I re-read. My comments weren't

Re: SJMS transaction

2016-02-11 Thread Quinn Stevenson
It sounds like SJMS may be replaying a transaction. Either that or the producer and consumer are not using the same JMS Session. Since you’re not losing messages, I’d guess it’s one of those two scenarios. I’m not sure if JMS Session Transactions are guaranteed one and only once delivery - a

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-04 Thread Quinn Stevenson
- I’ll see if it makes any difference with 5.9.0 > On Feb 4, 2016, at 9:52 AM, Quinn Stevenson <qu...@pronoia-solutions.com> > wrote: > > It is strange - I’m trying to compare what you have in the “standard” version > to what I did before. We tested our configs pretty he

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-04 Thread Quinn Stevenson
nnection config in the > project. > > > > On Wed, Feb 3, 2016 at 8:00 PM, Quinn Stevenson <qu...@pronoia-solutions.com >> wrote: > >> Are both the source and destination queues hosted by the same ActiveMQ >> broker? >> >> >> >>> On

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-04 Thread Quinn Stevenson
is 5.10.1, and it seems to be working with that broker. NOTE: I’m not changing the activemq-version in the POM when I change the broker version - I’m just starting a different broker (locally) on the same port. > On Feb 4, 2016, at 10:41 AM, Quinn Stevenson <qu...@pronoia-solutions.com>

Re: CamelBlueprintTestSupport No bean could be found in the registry

2016-02-04 Thread Quinn Stevenson
I usually use one of two ways. The first is to override createRegistry and add your bean implementation there: @Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry registry = super.createRegistry(); registry.bind( "bean-id", new BeanClass() ); return

Re: Route shudtdown using Route Policy not working

2016-02-04 Thread Quinn Stevenson
It looks like the route is shutting down - it’s just waiting for the timeout for the active exchange. You can change the shutdown timeout if you like with the DefaultShutdownStrategy > On Feb 4, 2016, at 9:03 AM, fxthomas wrote: > > hello, > > > I have

Re: ActiveMQ Consuming

2016-02-13 Thread Quinn Stevenson
w > transaction should be created. > > Best, > > Stan > 12 lut 2016 5:17 PM "Quinn Stevenson" <qu...@pronoia-solutions.com> > napisał(a): > >> Two questions - >> >> - What are the other transaction endpoints you’ll be using? >> - Will

Re: Error Handling and Redelivery Policy between routes

2016-01-29 Thread Quinn Stevenson
Can you share the configuration of the dlqErrorHandler, as well as a little more of the log - I’d like to see the exchange history. Quinn Stevenson > On Jan 28, 2016, at 4:28 AM, Michele <michele.mazzi...@finconsgroup.com>

Re: Error Handling and Redelivery Policy between routes

2016-01-29 Thread Quinn Stevenson
Thanks for the addition configuration and logs. Are you getting a message history in the logs that identifies exactly where the failure occurs? Without the message history, I’m guessing a little - but it appears the failure is in the CRM_LoginRoute on the inOut call to the jetty URI. I put

Re: Camel SCR

2016-01-29 Thread Quinn Stevenson
We’ve been running routes based on camel-scr in production for a few months now (Fuse 6.2 patch 1), and it’s been working pretty well. We use the SCR routes as templates, and then create instances with configuration files (cfg files in Karaf, properties files in Fabric8). The biggest issues

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-01-27 Thread Quinn Stevenson
ll create a dynamic proxy > object (that remains the same over the whole lifecycle but can cope with > service restarts just all right). > > Best regards > Stephan > > -Original Message- > From: Quinn Stevenson [mailto:qu...@pronoia-solutions.com] > Sent: Dienstag, 26. J

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Quinn Stevenson
Do you have an idea of how to fix this? If you can point me in the right direction, I’d be happy to get a PR going for it. Quinn Stevenson qu...@pronoia-solutions.com (801) 244-7758 > On Feb 2, 2016, at 10:05 AM, Brad Johnson <brad.john...@mediadriver.com> > wrote: > > An

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Quinn Stevenson
think the Camel registry is involved at all in this case. It would > only be involved when refering to the service via its interface name. > > The routebuilder is found by a ref too. So I doubt the class loader is > involved there. > > Christian > > On 02.02.2016 17:40, Qui

Re: Class substitution in bean?

2016-01-31 Thread Quinn Stevenson
One option would be to put the definition of your bean in one XML file and the route in another. You can have the production version of the supporting beans in src/main/resources/OSGI-INF/blueprint, and the test versions in src/test/resources/OSGI-INF/blueprint. That’s not a great solution

Re: Shutting down route with jms

2016-01-30 Thread Quinn Stevenson
I normally use the ControlBus EIP ( http://camel.apache.org/controlbus.html ) for this kind of thing - then I don’t have to write any custom processors or other supporting code. > On Jan 30, 2016, at 12:16 AM, Claus Ibsen wrote:

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Quinn Stevenson
uring into using route builders when I ran into this. > > On Tue, Feb 2, 2016 at 10:40 AM, Quinn Stevenson < > qu...@pronoia-solutions.com> wrote: > >> Thank You Christian - >> >> Yes - I pointed out that if I used the Bean Component, everything seemed >> to work as I expe

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Quinn Stevenson
is in java dsl: > to("bean:echo-service") > > It will find the bean with this id in blueprint. In your case it will be the > service reference. > > Christian > > On 26.01.2016 23:11, Quinn Stevenson wrote: >> When I use an OSGi Service registered using Blueprint

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Quinn Stevenson
t. > > On Tue, Feb 2, 2016 at 11:01 AM, Quinn Stevenson < > qu...@pronoia-solutions.com> wrote: > >> Thank You for opening the issue Brad - >> >> You beat me to it, but you’re explanation of the issue was much better >> than I could come up with - all I

Re: Transaction problem with Camel, ActiveMQ and Spring JMS

2016-02-03 Thread Quinn Stevenson
Are both the source and destination queues hosted by the same ActiveMQ broker? > On Feb 3, 2016, at 8:21 AM, Stephan Burkard wrote: > > Hi > > I have built a small Maven project (attached) to demonstrate a JMS > transaction problem in Camel routes under certain load

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Quinn Stevenson
> On Feb 2, 2016, at 3:15 PM, Christian Schneider <ch...@die-schneider.net> > wrote: > > On 02.02.2016 23:08, Quinn Stevenson wrote: >> Christian - >> >> I don’t know about a class loader issue, but I do know when I run the route >> configured as

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Quinn Stevenson
in the JIRA issue that was created for this - is that still the right place? Or do we need a different JIRA issue? > On Feb 2, 2016, at 3:15 PM, Christian Schneider <ch...@die-schneider.net> > wrote: > > On 02.02.2016 23:08, Quinn Stevenson wrote: >> Christian - &

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-01-27 Thread Quinn Stevenson
rint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd; > http://camel.apache.org/schema/blueprint;> All that’s different between the two is the reference to the

Re: Camel SCR

2016-01-29 Thread Quinn Stevenson
We haven’t found a plugin to generate the CFG files (property files in our case) - they’re created by hand. Luckily they don’t change much - that’s why the rename thing for semantic versioning will be a royal pain. I sympathize with the issues you’re having with CamelBlueprintTestSupport -

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-01-28 Thread Quinn Stevenson
’d like me to include in this issue? Quinn Stevenson > On Jan 27, 2016, at 3:22 PM, Ranx <brad.john...@mediadriver.com> wrote: > > I've reverted to using blueprint.xml for any service reference calls and > limiting the routebuilders for now. The part I foun

Re: OsgiServiceRegistry caching service references, why?

2016-02-23 Thread Quinn Stevenson
Tim - I can’t seem to get the patch to create the projects correctly. Could you put a zip or something out there? > On Feb 23, 2016, at 8:32 AM, Quinn Stevenson <qu...@pronoia-solutions.com> > wrote: > > Thank You Tim - I’ll take a look. > > No - the sample I put

Re: Activemq initialDelay ?

2016-02-22 Thread Quinn Stevenson
You could make your second/backup route timer driven - that may accomplish what you’re after. from( “timer:my-timer?period=5000 ). .pollEnrich( “jms….”, timeout) You’d probably need to make this route enable some other route to drain the queue if it found a message, and then have that

Re: ServiceFactory

2016-02-27 Thread Quinn Stevenson
mplate that in turn delegates calls to URIs for easy >> distribution. >> >> I can make that easy enough if I just use a Class.forName on a passed in >> String and delegate to it but I'm trying to color within the lines. >> >> On Sat, Feb 27, 2016 at 1:18 PM, Quin

Re: VirtualTopic message acknowledgment/confirmation

2016-02-29 Thread Quinn Stevenson
Have you tried the other acknowledgement modes? It sounds like you’re using auto acknowledgment. You could try setting up transactions as well. In either case, Camel will acknowledge the message once the exchange completes - so you don’t do that explicitly. > On Feb 24, 2016, at 4:37 PM,

Re: Apache Camel EIP to process batch of messages identifying those which can be filtered

2016-02-29 Thread Quinn Stevenson
How about a simple splitter that removes the duplicates? For example, a route like this http://camel.apache.org/schema/spring;> ${body} Could use a Splitter like this public class

Re: ServiceFactory

2016-02-27 Thread Quinn Stevenson
I don’t believe the way the service is exposed has any bearing on when a proxy is created - the proxy is created by the , not the Also, if you’re trying to achieve a service with the properties of an OSGi Service Factory (i.e. one service instance per calling bundle), I don’t think what you

Re: Activemq initialDelay ?

2016-02-22 Thread Quinn Stevenson
Can you provide a little more information on your use case? I’m having a little trouble understanding why you want an initialDelay for a JMS consumer. As you started, the file component has the initialDelay URI parameter to allow a little time before the component starts polling for the file.

Re: OsgiServiceRegistry caching service references, why?

2016-02-23 Thread Quinn Stevenson
Thank You Tim - I’ll take a look. No - the sample I put together is using camel-scr. When a @Reference injected service goes away, the camel context is stopped. When it comes back, the context is restarted - so I’m not seeing any caching. It’s part of a much larger sample I was working on -

Re: Consuming messages from hundred of AMQ queues using camel routes builder

2016-02-22 Thread Quinn Stevenson
tml <http://activemq.apache.org/nms/activemq-virtual-destinations.html>) and avoid some of the overhead of the camel route. > On Feb 22, 2016, at 10:50 AM, Darwish <othman.darw...@progressoft.com> wrote: > > Hi Quinn Stevenson > > you mean in my route builder in

Re: Consuming messages from hundred of AMQ queues using camel routes builder

2016-02-22 Thread Quinn Stevenson
Could you use a wildcard subscription on the initial consuming route? > On Feb 22, 2016, at 10:20 AM, Darwish wrote: > > what i looking for is to find a way of reliable message processing by > staging my processing as flowing : > > single or bounded number of

Re: Activemq initialDelay ?

2016-02-22 Thread Quinn Stevenson
What is the reasoning behind having the second consumer only process in the case of failover or slow processing? If you could deploy multiple instances of the consumer, you’d get the throughput you’re after. Also, if you want to ensure that only one consumer is actively processing messages

Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-01-26 Thread Quinn Stevenson
When I use an OSGi Service registered using Blueprint from a Java route (built using a Java RouteBuilder), the Camel route isn’t detecting the when the service is not available, and it isn’t updating when the service implementation changes. The simple setup I’m using has a Java interface for

Re: blueprint/nettyencoderfactory

2016-02-16 Thread Quinn Stevenson
the textline codec. If not >>>> provided, Camel will use the JVM default Charset.<<< > > I worked around this by not sending a string to netty4 but a byte-array. > > Cheers, Thomas. > >> Am 12.02.2016 um 17:13 schrieb Quinn Stevenson <qu...@pr

Re: Apache Camel EIP to process batch of messages identifying those which can be filtered

2016-02-18 Thread Quinn Stevenson
Sounds like a good use case for the Idempotent Consumer EIP http://camel.apache.org/idempotent-consumer.html > On Feb 18, 2016, at 7:06 AM, gilboy wrote: > > Hi > > My route calls a DB procedure which returns a

Re: ActiveMQ concurrentConsumers vs multiple connections

2016-02-18 Thread Quinn Stevenson
One more thing to look at would be the connection pool size. In the first case, you have 100 concurrent consumers fighting over 8 connections. In the second case, you only have 30 concurrent consumers fighting over the same 8 connections. Also, look at the Javadoc for the

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-18 Thread Quinn Stevenson
rote: > > I would use a new issue that just explains what happens without trying to > interpret. We do not yet know what really happens but I hope we can find > out. > > Christian > > 2016-02-03 3:40 GMT+01:00 Quinn Stevenson <qu...@pronoia-solutions.com>: > >

Re: cxf:bean doesn't resolve properties with CamelBlueprintTestSupport

2016-02-18 Thread Quinn Stevenson
I don’t know if this fits your use case, but you could let Blueprint do the substitution instead of camel. > On Feb 18, 2016, at 4:30 AM, Ephemeris Lappis > wrote: > > Hello. > > I've a unit test class based on CamelBlueprintTestSupport that works as > expected

Re: ActiveMQ Component and Connection Pooling not working

2016-02-18 Thread Quinn Stevenson
Have you tried changing to something like and then using from(“my-activemq:test”)? > On Feb 11, 2016, at 9:22 AM, JonFields wrote: > > Camel Version: 2.16.0 > ActiveMQ version: 5.13.0 > Container/Environment: Karaf 4.0.4/Blueprint > > I tried the example for

Re: ActiveMQ concurrentConsumers vs multiple connections

2016-02-18 Thread Quinn Stevenson
Can you try camel-sjms? Note that it doesn’t support XA transactions. > On Feb 18, 2016, at 8:50 AM, slew77 wrote: > > Hi, > > Thanks for the ideas. > > From what I can see, the consumer only uses a single connection and is > allowed up to 500 (default) sessions

Testing camel-scr with @References

2016-02-18 Thread Quinn Stevenson
I’ve created a project using camel-archetype-scr, and I’m trying to update the route to use an OSGi service. I have everything incorporated into the SCR Runner and the RouteBuilder, but I can’t figure out how to register a stub service so that the @References annotation will inject the

Re: ActiveMQ concurrentConsumers vs multiple connections

2016-02-18 Thread Quinn Stevenson
Can you try SJMS without the Spring transaction config? I think all you need is an ActiveMQConnectionFactory ( not even a pooled one since SJMS does it’s own internal pooling ) and the “transacted=true” URI parameter. I think you’ll have to get rid of the as well. > On Feb 18, 2016, at 9:29

Re: cxf:bean doesn't resolve properties with CamelBlueprintTestSupport

2016-02-18 Thread Quinn Stevenson
Sorry - my mistake. I normally use the Java DSL and then wire it up with blueprint - then I can use the Blueprint property placeholders. You could use a Java RouteBuilder something like this public class MyRouteBuilder extends RouteBuilder { boolean loggingFeatureEnabled = false;

Re: OsgiServiceRegistry caching service references, why?

2016-02-18 Thread Quinn Stevenson
Tim - Did you get a sample put together? I tried to reproduce what you’re seeing, but I can’t seem to make it happen. I created a camel-scr route (using the camel-archetype-scr), added a reference to an OSGi service, and created two bundles that register implementations of this service (they

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-19 Thread Quinn Stevenson
> > filter="instance=one" timeout="2000" /> > > > > > >http://camel.apache.org/schema/blueprint;> > > > > On Thu, Feb 18, 2016 at 4:14 PM, Brad Johnson <brad.john...@mediadriver.com> > wrote:

Re: cxf:bean doesn't resolve properties with CamelBlueprintTestSupport

2016-02-19 Thread Quinn Stevenson
Looks like something was fixed in 2.16.2 - I tried your sample and if I change the Camel version to 2.16.2, your test passes. > On Feb 19, 2016, at 4:28 AM, Ephemeris Lappis > wrote: > > Hello again. > > I've build a simple project with simple routes to test the

Re: cxf:bean doesn't resolve properties with CamelBlueprintTestSupport

2016-02-20 Thread Quinn Stevenson
OK - One other thing on this. If you add some default properties elements in your blueprint, you’re test works as written as well > On Feb 19, 2016, at 3:57 PM, Ephemeris Lappis > wrote: > > Hello. > Indeed, it

Re: cxf:bean doesn't resolve properties with CamelBlueprintTestSupport

2016-02-20 Thread Quinn Stevenson
I think it’s the startup order. I think the loadConfigAdminConfigurationFile() method was intended to override existing properties - not provide the initial values. When there aren’t any property keys at all in the context, the initial creation fails before the overrides can take effect (by a

Re: OsgiServiceRegistry caching service references, why?

2016-02-11 Thread Quinn Stevenson
camel >> OsgiServiceRegistry and therefore not using blueprint. That way it can >> change in the background. >> Beans that are obtained in the BlueprintContainer registry will have a >> blueprint proxy and will be unchanged from what they where before. >> >> Thank

Re: ActiveMQ Consuming

2016-02-11 Thread Quinn Stevenson
You can always have two “from” clauses and route the exchange to a direct route for the common processing. from( “activemq1://queue1”).to( “direct://process ); from( “activemq2://queue2”).to( “direct://process ); from( “direct://process” )……. Can you give a little more detail on what you’re

Re: OsgiServiceRegistry caching service references, why?

2016-02-10 Thread Quinn Stevenson
gt; Beans that are obtained in the BlueprintContainer registry will have a >> blueprint proxy and will be unchanged from what they where before. >> >> Thanks, >> Richard >> >> On Wed, Feb 10, 2016 at 11:55 PM, Quinn Stevenson < >> qu...@pronoia-solutions.com>

Re: OsgiServiceRegistry caching service references, why?

2016-02-10 Thread Quinn Stevenson
t; use the OsgiServiceRegistry, and I will not get a blueprint proxy. >>>>> >>>>> >>>>> >>>> interface="com.test.camel.test.Hello" /> >>>>> >>>>> >>>> xmlns="http://camel.apache.org/schema/bluep

Re: SJMS transaction

2016-02-10 Thread Quinn Stevenson
I don’t think you want DUPS_OK_ACKNOWLEDGE and transacted both set. As long as both queues are in the same ActiveMQ broker, all you should need is the “transacted=true” URI option for both the consumer and producer. If you have multiple ActiveMQ brokers involved, you’ll need to use camel-jms -

Re: file trigger processing lots of files

2016-03-09 Thread Quinn Stevenson
I think you could accomplish this with two routes. The first route would auto-start, and would watch for the trigger file. When the trigger file arrives, the route would start a second route using the control-bus EIP (http://camel.apache.org/controlbus.html

Re: Camel Test Endpoint Error

2016-03-10 Thread Quinn Stevenson
I would defiantly like to add an expression to split the messages - that would be very very useful. > On Mar 10, 2016, at 9:27 AM, Claus Ibsen <claus.ib...@gmail.com> wrote: > > On Thu, Mar 10, 2016 at 5:18 PM, Quinn Stevenson > <qu...@pronoia-solutions.com <mailto:qu.

Re: Camel Test Endpoint Error

2016-03-10 Thread Quinn Stevenson
>> Hi >> >> I have reproduced your issue and logged a ticket >> https://issues.apache.org/jira/browse/CAMEL-9696 >> >> And also work on improving so those options you pass on the file >> endpoint are passed on. Today they are dropped. >> >> On

Camel Test Endpoint Error

2016-03-10 Thread Quinn Stevenson
I’m trying to get the sample from the documentation for the Test Component working ( http://camel.apache.org/test.html ), but I keep getting a type conversion error. Here’s the route definition: Here’s the test method: @Test public void

Re: Camel Test Endpoint Error

2016-03-10 Thread Quinn Stevenson
actually expected this test to fail because my test data file has about 50 lines in it, so I expected the Mock to fail because the test only sends one message. Hopefully that clarifies what I’m after here > On Mar 10, 2016, at 8:50 AM, Quinn Stevenson <qu...@pronoia-solutions.com>

Re: Camel Test Endpoint Error

2016-03-10 Thread Quinn Stevenson
lueprint or osgi > container? > > On Thu, Mar 10, 2016 at 4:01 PM, Quinn Stevenson > <qu...@pronoia-solutions.com> wrote: >> I’m trying to get the sample from the documentation for the Test Component >> working ( http://camel.apache.org/test.html >>

Re: Camel Test Endpoint Error

2016-03-10 Thread Quinn Stevenson
template.sendBody( "direct://source", "My Value"); assertMockEndpointsSatisfied(); } } > On Mar 10, 2016, at 8:07 AM, Quinn Stevenson <qu...@pronoia-solutions.com> > wrote: > > The route is defined in blueprint and I’m running the test using > Camel

Re: Camel Test Endpoint Error

2016-03-10 Thread Quinn Stevenson
}; } @Test public void testRoute() throws Exception { template.sendBody( "direct://source", "My Value"); assertMockEndpointsSatisfied(); } } > On Mar 10, 2016, at 8:11 AM, Quinn Stevenson <qu...@pronoia-solutions.com> > wrote: > &

Re: file trigger processing lots of files

2016-03-19 Thread Quinn Stevenson
Do you need such a short shutdown timeout? Camel is killing your exchange(s) before they complete (one less than the number of threads you have active I’d guess). If you could give the exchanges enough time to shutdown, I think you’d have what you’re after. As far as CamelBatchComplete goes,

Re: file trigger processing lots of files

2016-03-15 Thread Quinn Stevenson
Yes - please share simplified versions of your routes. I’m sure we can come up with something. > On Mar 15, 2016, at 6:21 AM, jamesburn wrote: > > Hi > > Many thanks for your hints Quinn. > > With some playing, I've got Controlbus to work fairly well. I could have > done

Re: Handled on doTry... doCatch not Working as Expected

2016-03-15 Thread Quinn Stevenson
I believe the try/catch/finally DSL disables the normal Camel error handling ( http://camel.apache.org/try-catch-finally.html ). If I understand this correctly, the element in the snippet will not have any effect. I don’t see you logging

Re: Http Connection Pooling in Camel

2016-03-12 Thread Quinn Stevenson
I haven’t used this component very much, but the documentation (http://camel.apache.org/http4.html ) seems to hint at some sort of persistent connections (i.e. maxTotalConnections, connectionsPerRoute, etc). > On Mar 11, 2016, at 12:10 AM, Debraj Manna

Re: Exception handling by main route to all sub routes

2016-03-30 Thread Quinn Stevenson
Change the error handler on routeB to the noErrorHandler http://camel.apache.org/error-handler.html > On Mar 30, 2016, at 12:09 PM, kumar5 wrote: > > routeA is calling routeB and routeA has Exception handling and set the

Re: [Bug?] hl7dataformat hapicontext not in camel-blueprint.xsd

2016-04-05 Thread Quinn Stevenson
gt; So for instance the following snippet in my blueprint > > > > > yields: > > cvc-complex-type.3.2.2: Attribute 'parser' is not allowed to appear in > element 'camel:hl7'. > > This happens not only when validating the source but also when sta

Re: [Bug?] hl7dataformat hapicontext not in camel-blueprint.xsd

2016-04-07 Thread Quinn Stevenson
eers, Thomas. > >> Am 05.04.2016 um 16:36 schrieb Quinn Stevenson <qu...@pronoia-solutions.com>: >> >> I learned something new - I’ve never used the camel:dataFormats element >> before. >> >> I normally do something like this >> > class="

Re: Understanding Pooled Connection Factory on ActiveMQ

2016-04-07 Thread Quinn Stevenson
Your consuming route only defines one consumer (i.e. concurrentConsumers is not set, so it defaults to 1). Try increasing that. > On Apr 7, 2016, at 7:10 AM, Michele wrote: > > Hi everyone, > > I use ActiveMQ Component for my use case that foresee: > >

  1   2   3   4   >