Re: Camel Aggregator - Partial Data written to file

2017-01-31 Thread sa_james
Do your logs report multiple threads writing to the file? Did u try with a single thread? something along the line of: from("file:APIDataSamples?noop=true&maxMessagesPerPoll=1").threads(1,1)... - Guile Newbie -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Aggre

Re: Exchange is complete meaning

2017-01-26 Thread sa_james
*Does it mean that it is complete when it has gone through route3?* The reason why I am asking is because, when using the file consumer, the file will be moved into the .camel folder when */the exchange has completed/*. Does it mean that the file is moved when it has passed route1 or when it has pa

Re: Exchange is complete meaning

2017-01-26 Thread sa_james
Still struggling a little bit with the meaning of "Exchange is complete". Consider: Route1: from("direct:A").to("direct:temp") Route2: from("direct:temp").to("seda:temp") Route3: from("seda:temp").to("mock:sink") template.sendBody("direct:A", "message") What does Exchange is complete mean? T

Appending and Reading simultaneously

2017-01-23 Thread sa_james
Hi List, I have this route that is appending to a file every 5 sec while another route is trying to read the same file. How do I get the reader to pick up the file only when an append operation has completed? We know that tempFile/tempPrefix is prohibited in append mode. Thanks. - Guile Newb

Re: Aggregate, completion, notifybuilder

2017-01-13 Thread sa_james
Oh, I missed that. Did I tell you how great Camel is? - Guile Newbie -- View this message in context: http://camel.465427.n5.nabble.com/Aggregate-completion-notifybuilder-tp5792441p5792514.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Aggregate, completion, notifybuilder

2017-01-13 Thread sa_james
Now I am getting closer to my goal. Consider this: route1 = from("file:target?fileName=$simple(random())") route2 = from("file:target") I just found out that notifyBuilder.wereSentTo("file:target") does not work for the first case. Does it mean that the uri in nofityBuilder also take option-para

Re: Aggregate, completion, notifybuilder

2017-01-13 Thread sa_james
Lets say that I am benchmarking a route. I send 10 000 messages to the small route from the previous example. I was expecting to be able to use a notifyBuilder to block until all messages are completed. Am I missing something? Thanks. - Guile Newbie -- View this message in context: http://

Re: Aggregate, completion, notifybuilder

2017-01-13 Thread sa_james
Why does this one match? this.context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { onCompletion().log("${body} completed"); from("direct:S") .aggregate(new GroupedExchangeAgg

Re: Aggregate, completion, notifybuilder

2017-01-13 Thread sa_james
I have seen my mistakes It turns out, that I was declaring the notifyBuilder when the defaultCamelContext was already started, since I was using the one from CamelTestSupport. It was not really an aggregate problem, it was more a NotifyBuilder problem. I had refactored the code to use the conte

Re: Aggregate, completion, notifybuilder

2017-01-13 Thread sa_james
Okay, I went back and read that chapter again. Still a little confused, to be honest. It seems like every exchange in the aggregate is complete after is has been added to the aggregate, but not the aggregate. Lets say I would like to time how long it takes to write the two messages into "file:targe

Aggregate, completion, notifybuilder

2017-01-12 Thread sa_james
Still riding the camel and I became confused with aggregate while doing some tests. Consider: /from("direct:start").aggregate(constant(true)).groupExchanges().completionSize(2) .to("log:I-see-you") .to("file:target").routeId("myroute") template.sendBody("direct:start","Exchange1") template.

Re: hawtio embedded

2017-01-01 Thread sa_james
Yes. It is embedded in another application. By reading the docs, I thought that it was enough to reference the folder containing the war file instead of actually referencing the war file. - Guile Newbie -- View this message in context: http://camel.465427.n5.nabble.com/hawtio-embedded-tp579

Re: hawtio embedded

2016-12-31 Thread sa_james
Running inside Eclipse gives me this error: / Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/util/log/Logger at com.controlbus.eip.MainApp.main(MainApp.java:16) Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.util.log.Logger at java.net.U

hawtio embedded

2016-12-31 Thread sa_james
I am evaluating hawtio and started it embedded in a very simple standalone test application. Only thing I get is a almost blank page with a bar that has headers /"Attributes Operations Chart"/ plus a user symbol in the top right corner that is not logged in. Whatelse should I do to see more? Thanks

Camel AggregateStrategy in SJMS-Batch

2016-12-23 Thread sa_james
While testing with SJMS-Batch, I replaced my own aggregateStrategy with the GroupedExchangeStrategy from camel and was surprised to see that the messages are all null. GetBody == null, Exchange.GROUPED_EXCHANGE == null. Any Idea why? Thx. - Guile Newbie -- View this message in context: http

Re: Production Standalone

2016-12-21 Thread sa_james
I have something like 30 routes. I would like to start with standalone first and eventually move on to the next step. Wanted to know whether or not a lot of people are running camel standalone successfully ...Uptime is my most important characteristic at the moment. - Guile Newbie -- View th

Production Standalone

2016-12-21 Thread sa_james
Anyone running any serious app standalone in prod? Uptime? Thanks - Guile Newbie -- View this message in context: http://camel.465427.n5.nabble.com/Production-Standalone-tp5791833.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Catching Exception

2016-12-17 Thread sa_james
Oh I see. Yes I know that ActiveMQ can do that. WebSphere does support it too, but to a lesser extend than ActiveMQ. If WebSphere does not signal to the client that a reconnect is allowed, the client is going to crash. Anyway... Is it possible that Apache Camel is the greatest Library ever created

Re: Catching Exception

2016-12-17 Thread sa_james
So I went back and read the book again, but it does not show how to handle exception outside of the routing engine. I check the file consumer example and tried to apply it, but it did not work. This is what I did: /onException(classOf[Exception]).to("log:was-caught ${body}") from("batch-sjms:test

Restarting an Endpoint from an ErrorHandler

2016-12-16 Thread sa_james
Does something like the following make sense? onException(*ConnectionException.class*).*process( ...stop and restart myendpoint here ...) *from("myendpoint").to("log:test-exception") -- View this message in context: http://camel.465427.n5.nabble.com/Restarting-an-Endpoint-from-an-ErrorHandl

Catching Exception

2016-12-16 Thread sa_james
Does Camel catch Exceptions that occur in the first Producer in a route? lets say I have this: *onException(Exception.class).to("log:exception ${Body}") *from("sjms:queue").to("log:test ${Body}") If I shut down the Queue, an exception is throws in the console but camel does not log it. Am I unde

Re: NotifyBuilder whenDoneSatisfied mock

2016-12-16 Thread sa_james
I Mean the Assertion error, like so: java.lang.AssertionError: mock://test Received message count. Expected: <1> but was: <2> I also noticed that when I used the notifyBuilder.*from("something").*whenDoneSatisfied(mock) then it always works. Without the *from("something") *part, it does not alway

NotifyBuilder whenDoneSatisfied mock

2016-12-15 Thread sa_james
I have been writing some unit tests using notifybuilder but I am still struggling with some behaviors that I cannot explain. For instance: mock.expectedMessageCount(1) NotifyBuilder(context).whenDoneSatisfied(mock).create() ... later *mock.assertIsSatisfied(1000)* would return sometimes *1

What to do with Null Body messages?

2016-12-06 Thread sa_james
I have a processing Pipeline where I sometimes receive null-Body Messages. When I Forward the Messages to the next steps, there is an error. How do I get rid of the null-Body exchanges? I mean, they have to go somewhere. Thx. -- View this message in context: http://camel.465427.n5.nabble.com/

receiving with template and sending to the next processing stage

2016-12-06 Thread sa_james
I am polling a Queue from time to time with a timer and consuming it with a template. I want to empty the Queue when it is time so I use a Loop. How do I send every single message from my receiveBody to the next processor as I am Looping to empty the Queue? Thx. -- View this message in context:

Re: camel-jms

2016-12-01 Thread sa_james
See this link for how my problem was solved. BAsically, use /main.run()/ instead of /main.start()/ -- View this message in context: http://camel.465427.n5.nabble.com/camel-jms-tp5790832p5790898.html Sent from the Camel - U

Re: Throwing Disconnected Exception with camel-sjms

2016-12-01 Thread sa_james
It seems the right way to run a camel application is by using /main.run()/ instead of /main.start()/ It solved almost all of my problems. -- View this message in context: http://camel.465427.n5.nabble.com/Throwing-Disconn

Re: stand-alone problem

2016-12-01 Thread sa_james
Wow, it works. I have been struggling for two days as to why it would all of a sudden stop working. And to make matter worse, the connect/reconnect from spring that I reported in this post also started working. Thanks a log Claus. Cam

Re: camel-jms

2016-12-01 Thread sa_james
Funnily enough, when I swap the activeMQConnectionFactory with websphereConnectionFactory, spring does the reconnect. I might be missing something. -- View this message in context: http://camel.465427.n5.nabble.com/camel-jms-tp5790832p5790895.html Sent from the Camel - Users mailing list archiv

Re: stand-alone problem

2016-12-01 Thread sa_james
So If I ditch spring and go back to using setters, everything will be fine? -- View this message in context: http://camel.465427.n5.nabble.com/stand-alone-problem-tp5790885p5790889.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: stand-alone problem

2016-12-01 Thread sa_james
If I set a breakpoint at the last statement, it will consumes messages from the queue. -- View this message in context: http://camel.465427.n5.nabble.com/stand-alone-problem-tp5790885p5790887.html Sent from the Camel - Users mailing list archive at Nabble.com.

stand-alone problem

2016-12-01 Thread sa_james
Here I am again with a simple test: /from("jms:queue").to("log:test")/ / / After I have started the app: INFO Route: route1 started and consuming from: jms://queue INFO Total 1 routes, of which 1 are started. INFO Apache Camel 2.18.0 (CamelContext: camel-1) started in 0.481

Re: Throwing Disconnected Exception with camel-sjms

2016-12-01 Thread sa_james
In case you wonder about the route, it is really simple: /from("jms:TEST") .to("log:test")/ Thx. -- View this message in context: http://camel.465427.n5.nabble.com/Throwing-Disconnected-Exception-with-camel-sjms-tp5790882p5790883.html Sent from the Camel - Users mailing list archive at Nabbl

Throwing Disconnected Exception with camel-sjms

2016-12-01 Thread sa_james
The ride continues between camel-jms and camel-sjms While consuming from a jms-queue, I would like to log exceptions when the queue has crashed. When I disconnect the queue from the network, camel-sjms does not thrown any exception. How can I do that? I tried with /onException(Exception.c

Re: camel-jms

2016-12-01 Thread sa_james
Id did the testing with Spring trying to reconnect to a Websphere and I did configured the factory as follows: Sadly it does not reconnect. What I am missing? Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/camel-jms-tp5790832p5790875.

stand-alone starts and stops after switching to spring

2016-12-01 Thread sa_james
Testing Spring reconnect with camel and I did configured the factory as follows: Sadly it does not reconnect. Anyway to achieve this? Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/stand-alone-starts-and-stops-after-switching-to-spring-t

Re: camel-jms

2016-11-30 Thread sa_james
I did not know that. I will test it. Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/camel-jms-tp5790832p5790844.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-jms

2016-11-30 Thread sa_james
What u describe is failover. What I mean is for the client to wait until a machine that went down, comes back up while the client is looping waiting to reconnect. camel-sjms does not even let you know that the connection has been lost. Camel just silently continues to run while the connection is go

camel-jms

2016-11-30 Thread sa_james
Camel noob needs some help. It seems SJMS does not do reconnect. Now I am looking at camel-jms and it seems camel-jms does not batch. Any other alternatives out there? Regards -- View this message in context: http://camel.465427.n5.nabble.com/camel-jms-tp5790832.html Sent from the Camel - Users

Re: Exchange is complete meaning

2016-11-26 Thread sa_james
Yes I have seen it. It doesn't open multiple connections though. It uses a shared one. I will have to benchmark to decide. Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Exchange-is-complete-meaning-tp5790648p5790667.html Sent from the Camel - Users mailing list arch

Re: Exchange is complete meaning

2016-11-26 Thread sa_james
Thank you very much. I just discovered the tracing feature of camel to be able to follow along and you just confirmed my finding. I was using the SJMS component and found out that the SessionBatchTransactionSynchronization will commit the Batch only after the last exchange has finished the route.

Exchange is complete meaning

2016-11-25 Thread sa_james
Hi List, newbie question regarding the fundamental concept of completeness of an exchange. Here is a sentence from the camel doc: "The onCompletion DSL allows you to add custom routes/processors when the original Exchange is complete" Let's say I have this simple route: from("jms:source"). o

jms and camel

2016-11-02 Thread sa_james
Hello, I would like to consume a jms queue by closing the committing each opened session only after I have received 10 messages. Can I do that with camel? Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/jms-and-camel-tp5789672.html Sent from the Camel - Users mail