Re: Losing mi sanity on pipeline testing

2016-10-28 Thread Quinn Stevenson
I don’t think DataSet is going to do what you’re after. You could try a mock endpoint, and use returnReplyBody(…) to specify the response - that may do what you’re after > On Oct 28, 2016, at 1:18 AM, Edoardo Causarano > wrote: > > Hi Quinn, > > Thanks that's correct, but really I was lookin

Re: Losing mi sanity on pipeline testing

2016-10-27 Thread Quinn Stevenson
I’m assuming you’re just trying to get the DataSet to work for testing - correct? (DataSet isn’t really meant for anything other than testing). If that’s the case, use the DataSet as the Consumer - i.e. from(“dataset://source”) and you should be OK. > On Oct 27, 2016, at 7:15 AM, Edoardo Caus

Re: OnException across camelcontext not called when using direct-vm

2016-10-25 Thread Quinn Stevenson
I see there isn’t any exception handling in context2, but the default error handler is still there - have you tried setting the error handler on the context to “No Error Handler”? (http://camel.apache.org/error-handler.html ) > On Oct 25, 2016, at 7:3

Re: OnException across camelcontext not called when using direct-vm

2016-10-25 Thread Quinn Stevenson
Have you tried disabling error handling on context2? > On Oct 25, 2016, at 12:37 PM, Santhosh wrote: > > I have multiple context, and I use direct-vm to call route in another > context. If there any exception, direct-vm is not passing that exception > correctly to the parent/source route. If I

Re: Send message to temporary queue

2016-10-18 Thread Quinn Stevenson
I don’t see where you’re using Camel in this snippet - am I missing something? What type of error are you seeing? > On Oct 14, 2016, at 5:16 AM, axdz wrote: > > Hi all, > > Follow this link > http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html >

Re: Apace Camel : Custom Redelivery Policy

2016-10-18 Thread Quinn Stevenson
Is there a specific exception you can catch when the connection fails? If so, you could use onException to handle that case. onException(ConnectException.class).maximumRedeliveries(3).handled(true).to(jms:dlc) Something like the above should handle #1. > On Oct 18, 2016, at 2:38 AM, Shabin578

Re: [camel-ftp] Can't catch Invalid SFTP port exception

2016-10-18 Thread Quinn Stevenson
Have you tried enabling the bridge error handler feature (consumer.bridgeErrorHandler)? http://camel.apache.org/file2.html > On Oct 18, 2016, at 7:33 AM, Goyal, Arpit wrote: > > Anyone having idea about what's wrong here? > > Sent from my iPhone > >> On O

Re: JMS Component configurations

2016-09-13 Thread Quinn Stevenson
I’ve done this a few different ways, but it depends on your routes and deployment technology. For example, when I’m deploying to a Karaf/OSGi container, I’ll create RouteBuilders that I can configure with the specifics of the environment, and then use Blueprint to configure the individual route

Re: JMS message with Inout pattern

2016-09-09 Thread Quinn Stevenson
Sorry - you’re right. I was basing my answer on when I was writing the “consumer side” in pure Java. I had to send a response in that case since Spring/Camel wasn’t around to help with the details. I put together a quick test of those routes, and it passes on Camel 2.10.7 - so I’m not sure wh

Re: PollEnrich with file language

2016-09-09 Thread Quinn Stevenson
I messed with the sample I posted earlier, and I think I see what going on now - pollEnrich().simple(….) is evaluating the expression - but the “?move=“ part doesn’t evaluate to anything meaningful at the point it’s evaluated. The “move=“ expressions need to be evaluated after the file has been

Re: PollEnrich with file language

2016-09-08 Thread Quinn Stevenson
chiveDir.exists()); assertEquals("Should not have any files in source directory", 0, testSrcDir.listFiles().length); File[] archiveFiles = testArchiveDir.listFiles(); assertEquals("Should only have one file in archive directory", 1, archiveFiles.length);

Re: camel "exec" component, how to reference the executable

2016-09-08 Thread Quinn Stevenson
What version of Camel are you using? The following works for me in Camel 2.17.3 http://camel.apache.org/schema/spring";> /tmp/my-script.sh It correctly calls the script in /tmp > On Sep 8, 2016, at 3:11 PM, clinton wrot

Re: Unable to connect from camel-ftp to apache mina-sshd

2016-09-08 Thread Quinn Stevenson
t to your GIT project as that is the next > thing I want to verify :) > > Regards, > Arpit. > > -Original Message- > From: Quinn Stevenson [mailto:qu...@pronoia-solutions.com > <mailto:qu...@pronoia-solutions.com>] > Sent: Thursday, September 8,

Re: Camel Simple regex isn't being executed but shown as string instead

2016-09-08 Thread Quinn Stevenson
Have you tried setting the resultType attribute on the simple element? … Also, should the expression match the sample data? When I set the resultType attribute, I’m getting “false” - indicating the regex didn’t match. Can you elaborate on the pattern you’re trying to match? > On Sep 3, 2016

Re: PollEnrich with file language

2016-09-08 Thread Quinn Stevenson
I apologize - I missed the "&move=" when I looked at this the first time. What you have looks like it should work to me as well. > On Sep 8, 2016, at 1:45 PM, souciance > wrote: > > Well in that case the documentation needs to be updated because looking at: > https://camel.apache.org/file2.h

Re: Camel context shutdown waiting for ExecutorService

2016-09-08 Thread Quinn Stevenson
Can you share a little more information? Like the route definition and how you’ve configured the Camel Context? > On Sep 7, 2016, at 1:02 PM, Martin Lichtin wrote: > > Hi All > Having an issue with Camel context shutdown taking much longer than expected. > The trace below shows it quite well.

Re: Unable to connect from camel-ftp to apache mina-sshd

2016-09-08 Thread Quinn Stevenson
For what it’s worth, I’ve written a JUnit Resource that uses MINA-SSHD - I use it quite a bit in my testing of SFTP routes. https://github.com/hqstevenson/sftp-junit Unfortunately, I haven’t put any documentation or examples of using it with the pro

Re: Unmarshal fixed length Binary data

2016-09-08 Thread Quinn Stevenson
If BeanIO doesn’t work out, you can always write your own DataFormat - I’ve had to do that a few times, and it’s pretty straightforward. http://camel.apache.org/custom-dataformat.html > On Sep 7, 2016, at 8:15 AM, kaustubhkane wrote: > > Thanks

Re: JMS message with Inout pattern

2016-09-08 Thread Quinn Stevenson
I think the problem is you need to send the response message on the consumer side - i.e. add something like .to( “jms://outputq ” ) in the *Consumer side* route > On Sep 7, 2016, at 9:28 PM, Venu_s wrote: > > Hello, > > I am using camel version 2.10.0.redhat-60024 ( the redhat version of the

Re: PollEnrich with file language

2016-09-08 Thread Quinn Stevenson
I think the File component is doing exactly what you asked it to :-) The URI of the File component contains directories - not file names. You control the file name through either the fileName URI option or the CamelFileName/CamelOverruleFileName headers. Check out the docs for the file compon

Re: downloading large files in chunks

2016-09-02 Thread Quinn Stevenson
com> >>> wrote: >>> >>>> Absolutely. Love to set up a VM for my server. I just had a "duh" >>> moment >>>> when I did it. No harm, no foul. >>>> >>>> On Fri, Sep 2, 2016 at 10:00 AM, Quinn Stevenson

Re: Problem with objects not being released from memory.

2016-09-02 Thread Quinn Stevenson
I’ve used HAPI quite a bit, and I’ve never noticed a memory leak with it (doesn’t mean it isn’t there though). Can you tell what object/class is holding the objects? When you said “they’re never cleaned up by the GC”, I’m assuming you forced a GC? > On Aug 30, 2016, at 1:28 PM, litian wro

Re: downloading large files in chunks

2016-09-02 Thread Quinn Stevenson
for > me. Are you propagating Trojan horses here? Heh. > > On Fri, Sep 2, 2016 at 9:56 AM, Quinn Stevenson > wrote: > >> I think something like this might work for you >> >> >> >> >> >> >> >> >> &g

Re: downloading large files in chunks

2016-09-02 Thread Quinn Stevenson
netty and see if that works. It can control chunk size but it >> is >>>> also streaming in any case so you may not even need to be concerned >> about >>>> it. >>>> >>>> Brad >>>> >>>> On Thu, Sep 1, 2016 at 8:

Re: Unmarshal fixed length Binary data

2016-09-02 Thread Quinn Stevenson
Have you looked at the BeanIO DataFormat? (http://camel.apache.org/beanio.html ) > On Sep 2, 2016, at 7:35 AM, kaustubhkane wrote: > > Hi, > > We have a fixed length Binary data. > > I am looking at the Bindy Data Format and found that it supports > unmars

Re: Adding options to default idempotent File Repo

2016-09-02 Thread Quinn Stevenson
You are correct - to customize the configuration for an Idempotent Repository, you need to create a bean for the repository and set it’s specific properties. The Idempotent Repository used by the file component is pluggable - it just needs to implement the org.apache.camel.spi.IdempotentReposito

Re: Pulling multiple files in simultaneously

2016-09-01 Thread Quinn Stevenson
Would something like this work? I’m not sure how far you can push the concurrentConsumers for SEDA though. http://camel.apache.org/schema/spring";> 1000 1000 > On

Re: downloading large files in chunks

2016-09-01 Thread Quinn Stevenson
Check out the section on the ftp component page about “Using a Local Work Directory” (http://people.apache.org/~dkulp/camel/ftp2.html ) - I think that may be what you’re after. > On Sep 1, 2016, at 9:30 AM, S Ahmed wrote: > > Hello, > > Is th

Re: Disabling concurrency in camel route

2016-09-01 Thread Quinn Stevenson
e is > you can directly configure the number of threads that are consuming from it. > > On Thu, Sep 1, 2016 at 1:50 PM, Quinn Stevenson > wrote: > >> When I’ve hit situations like this, I’ve used the SEDA component to >> serialize the processing after the message was rec

Re: Exception when suspending splitter

2016-09-01 Thread Quinn Stevenson
I don’t know if split supports suspend/resume - I think it would have to be the underlying component (in this case the file component). Also, I believe suspend/resume is for a route or a context - not an exchange. I think the route is trying to complete the current exchange (i.e. the current f

Re: Disabling concurrency in camel route

2016-09-01 Thread Quinn Stevenson
When I’ve hit situations like this, I’ve used the SEDA component to serialize the processing after the message was received. All of the processing winds up in the SEDA route, and the actual receiving route (in this case, from Netty) just calls the SEDA route. Something like

Re: Binary Data Structure Marshalling and Unmarshalling

2016-08-30 Thread Quinn Stevenson
If the data formats you’ve listed don’t work, I’d guess you’ll need to write your own DataFormat (http://camel.apache.org/custom-dataformat.html ) > On Aug 17, 2016, at 5:41 AM, Pratik Thacker wrote: > > We need to decode and encode binary data s

Re: Triggering choice-when block when no Exchanges make it through

2016-08-30 Thread Quinn Stevenson
If any files are found, the processor and choice condition will be executed, so could the fileProcessor be messing with the headers? Also, believe with this configuration that Camel will only set the CamelBatchComplete header to true on the last file it found during the last poll - is that what

Re: Bean injection?

2016-08-05 Thread Quinn Stevenson
I normally override createRegistry() and add my beans to the registry there - something like this \ @Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry registry = super.createRegistry(); registry.bind( "bean-name", new MyBean()); return registry; }

Re: Route ID in camel logger

2016-07-22 Thread Quinn Stevenson
I use MDC logging (http://camel.apache.org/mdc-logging.html <http://camel.apache.org/mdc-logging.html>) to get the context ID, route ID and breadcrumb id in my logs Quinn Stevenson qu...@pronoia-solutions.com (801) 244-7758 > On Jul 22, 2016, at 2:13 AM, fxthomas wrote: > >

Re: Convert message into two converters and dilliver them to one destination

2016-07-21 Thread Quinn Stevenson
What are you using for you expression that generates the messageId? I don’t see anything in the routes below (in fact, the last route isn’t valid). Can you explain what sort of duplicate you are trying to avoid? It would seem that given the same input, the result of converting to object A or B

Re: Convert message into two converters and dilliver them to one destination

2016-07-20 Thread Quinn Stevenson
I’m not following your logic in this route - both of the sub-routes are using the same idempotent repository, so I think you’ll wind up marking items as duplicates when they really are not. Did you mean to put the idempotent consumer on the from=source route?. > On Jul 20, 2016, at 3:42 AM, red

Re: Convert message into two converters and dilliver them to one destination

2016-07-19 Thread Quinn Stevenson
I don’t think multicast will do what you’re after - it sends the same message to multiple endpoints. I think you could accomplish what you’re after using three routes: > On Jul 19, 2016, at 7:21 AM, redpower1989 wrote: > > Maybe i could make it mo

Re: Camel logging

2016-07-07 Thread Quinn Stevenson
You didn’t include the configuration for myFileAppender - it’s a little difficult to guess what’s going on without a complete configuration. Can you share the entire log4j.properties file? > On Jul 7, 2016, at 7:23 AM, mabahma wrote: > > Hello > > i'm using a camel route .. and loggin using

Re: Handling the reply of a request in InOut mode

2016-06-28 Thread Quinn Stevenson
some drinks. :) > > > On 6/28/2016 4:30 PM, Quinn Stevenson wrote: >> I messed with my project configuration a little, and I found the version of >> ActiveMQ (for the camel-activemq component) seems to make a difference. >> >> I get all kinds of errors when I run

Re: Handling the reply of a request in InOut mode

2016-06-28 Thread Quinn Stevenson
cases, I’m using version 5.13.3 of activemq-junit (it’s not available before ActiveMQ 5.13.0, but it works with older versions of ActiveMQ). > On Jun 28, 2016, at 2:03 PM, Quinn Stevenson > wrote: > > Now I’m really confused. I copied/pasted the unit test you shared into my &

Re: v2.12.3 - Simple Expression - Logical Operators in XML

2016-06-28 Thread Quinn Stevenson
I think you need to use the XML escape sequence for the ampersand - i.e. && instead of && (or ‘and’ in this case). > On Jun 28, 2016, at 1:41 PM, daelliott1234 wrote: > > The documentation (http://camel.apache.org/simple.html) states "Use && or || > from Camel 2.9 onwards." > There is no exampl

Re: Handling the reply of a request in InOut mode

2016-06-28 Thread Quinn Stevenson
Now I’m really confused. I copied/pasted the unit test you shared into my project (no modifications), and the test passes. Maybe you could create a simple project on GitHub so we can collaborate this? > On Jun 28, 2016, at 1:32 PM, Thomas Hehl wrote: > > import java.util.concurrent.TimeUnit

Re: Handling the reply of a request in InOut mode

2016-06-28 Thread Quinn Stevenson
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) >at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) >at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) >at > org.eclipse.jdt.internal.junit.runn

Re: moving files to dynamically created subfolders

2016-06-28 Thread Quinn Stevenson
Does this work for you? from("file://SRC") .setHeader( "CamelFileName", simple("${header.CamelFileName.replace('_', '/')}")) .to( "file://DST") ; > On Jun 28, 2016, at 11:25 AM, gringo512 wrote: > > Hi, > > Is there any way to create a route using File component which ca

Re: Handling the reply of a request in InOut mode

2016-06-28 Thread Quinn Stevenson
oming into process is the message I'm sending into the queue. I need > to know how to process the response. Did I miss it? > > Thanks! > > > On 6/28/2016 12:44 PM, Quinn Stevenson wrote: >> I’m not sure exactly what you’re trying to do with the processors, but >&g

Re: Handling the reply of a request in InOut mode

2016-06-28 Thread Quinn Stevenson
I’m not sure exactly what you’re trying to do with the processors, but here’s a simple unit test that works for me. You can mess with the processors and make them act more like your real route. package com.pronoia.camel; import java.util.concurrent.TimeUnit; import org.apache.activemq.camel.c

Re: Blueprint request/reply pattern

2016-06-28 Thread Quinn Stevenson
target.expectedBodiesReceived("Response Message"); template.sendBody("direct://trigger", "Trigger Message"); assertMockEndpointsSatisfied(); } } > On Jun 28, 2016, at 10:38 AM, Quinn Stevenson > wrote: > > I pulled up an old sa

Re: Blueprint request/reply pattern

2016-06-28 Thread Quinn Stevenson
150327-1349-B467 >> Build date: 20150327-1349 >> >> Apache Camel 2.15.1.redhat-621084 >> >> It's the developer studio that's crapping out. >> >> >> On 6/28/2016 12:23 PM, Quinn Stevenson wrote: >>> Hmmm… I just ran the unit test using thi

Re: Blueprint request/reply pattern

2016-06-28 Thread Quinn Stevenson
Hmmm… I just ran the unit test using this XML again, and I’m not seeing any errors. What version of Camel are you using? > On Jun 28, 2016, at 10:21 AM, Thomas Hehl > wrote: > > I cannot get your XML to parse. It's throwing exceptions. > > > On 6/28/2016 11:57

Re: Blueprint request/reply pattern

2016-06-28 Thread Quinn Stevenson
The only thing that looks a little off to me in the XML is the log statement. I’m not sure why you’d get the original message - I’d expect it to be null/empty. Maybe it is getting set somewhere else in your route? Here’s a simple example that works for me http://www.osgi.org/xmlns/blueprint/v

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 { from(

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( "timer://%s?timerPeriod=

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&action=%s", "my-route", "stop") .end(); Hope that he

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 ro

Re: How to stop a dynamic route

2016-06-07 Thread Quinn Stevenson
One problem with the control bus is you won’t be able to remove the route - only stop it. I’m not sure I understand exactly why you need to removed the route. Would it be possible to use the same “route”, but dynamically configure it to process a batch and then stop? So when you trigger it ag

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 > CamelBatchComplete, then when is true, sto

Re: Camel blueprint: Unable to load class org.apache.camel.builder.LoggingErrorHandler

2016-06-02 Thread Quinn Stevenson
Try changing LoggingErrorHandler to LoggingErrorHandlerBuilder > On Jun 1, 2016, at 10:56 AM, Alex Soto wrote: > > class="org.apache.camel.builder.LoggingErrorHandler"> > >

Re: Updating datasource at runtime with camel-sql

2016-06-02 Thread Quinn Stevenson
If you’re willing to use camel-scr or camel-blueprint, you can make this happen pretty easily. You’d expose the data source as a service, and then inject it into the route - the exact method would change based on whether you’re using camel-scr or camel-blueprint. If you’re using camel-scr, whe

Re: move alternate files to different folder

2016-05-24 Thread Quinn Stevenson
The simple test will send the files to /target/out/(dir1|dir2). BTW - the test is complete (minus the import statements). Paste it into a java file and run/play with it. > On May 24, 2016, at 12:33 PM, pp wrote: > > or does it send the file to //target/out/dir1? //target/out/dir2? > > > >

Re: .choice(), .when() not working as expected in the camel route

2016-05-24 Thread Quinn Stevenson
Components differ in how they deal with application errors. For example, the HL7 codecs for camel-netty4 and camel-mina2 don’t interrogate HL7 acknowledgements so they don’t raise exceptions when an HL7 NACK is received - they just return the acknowledgement in the body. Since I attempt to res

Re: Routing with logic

2016-05-24 Thread Quinn Stevenson
I’ve done stuff like this before using a timer to schedule polling the external system via their APIs. Sometimes you can use Camel’s bean binding to invoke their APIs and get what you’re after. However, I have implemented Camel Processors before to do this. If you can provide more detail abou

Re: move alternate files to different folder

2016-05-24 Thread Quinn Stevenson
For the file producer, you can set the CamelFileName header and include the dynamic part there. public class DynamicFileNameTest extends CamelTestSupport { @Override protected RoutesBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { @Override

Re: Dynamically continue route on exception

2016-05-24 Thread Quinn Stevenson
You’re not limited to a constant with continued - you can use an Expression or a Predicate. > On May 24, 2016, at 7:38 AM, dmitriyC300 wrote: > > Hi Guys, > I have a use case where I'd like to have route proceed on exception. I know > we can use continued at the time we configure the route. B

Re: Camel jms - Custom Message ID

2016-05-19 Thread Quinn Stevenson
The JMS Message ID is generated by the JMS server (not Camel) - at least that’s what I remember from the JMS Specs. If there is a was to customize the JMS Message ID, I think you’d have to look at your JMS provider and see what they offer. > On May 19, 2016, at 4:07 AM, Adarsh_GU wrote: > > H

Re: Camel jms - In Out Pattern

2016-05-18 Thread Quinn Stevenson
It looks like the other system isn’t setting the JMSCorrelationID, so the route is timing-out waiting for a response with that correlation ID. Have you tried setting replyToType=Exclusive? You can see the details in the camel-jms docs (http://camel.apache.org/jms.html

Re: mock http endpoint and retrieving value form properties file

2016-05-18 Thread Quinn Stevenson
Deepak - Where do you define the bean so Camel can find it? Normally, I’d put the bean in another Spring XML file (in src/test/resources/META-INF/spring for symmetry), and then change the application context such that it will load both Spring XML files. protected AbstractApplicationContext cre

Re: .choice(), .when() not working as expected in the camel route

2016-05-17 Thread Quinn Stevenson
Actually, you can (I wrote camel-mllp :-) ). When the camel-mllp component is used as a consumer (i.e. a TCP listener), the body of the exchange will be a byte[] containing the HL7 message. You can use the camel-hl7 data format to unmarshal just as you do when you’re using camel-mina2 or camel

Re: mock http endpoint and retrieving value form properties file

2016-05-17 Thread Quinn Stevenson
Deepak - There are quite a few ways to go about this, but I think the easiest thing for you (given what you said so far), would be to write a bean the behaves the way you want - set the response code header to what you (i.e. Exchange.HTTP_RESPONSE_CODE/CamelHttpResponseCode), throw and exceptio

Re: .choice(), .when() not working as expected in the camel route

2016-05-17 Thread Quinn Stevenson
OK - then I don’t think you’ll ever get that body from a real system when you’re using Camel (unless you do something to make it happen). Two of the components that support MLLP (camel-mina2, camel-netty4) do NOT parse/convert the message by default - they just wrap the payload in the MLLP enve

Re: mock http endpoint and retrieving value form properties file

2016-05-16 Thread Quinn Stevenson
Since you’re replacing to to URI, you could create another properties file with a different test value in src/test/resources. Then you could add the a test route for that URI in the SpringCamelTestSupport by implementing the createRouteBuilder method. > On May 16, 2016, at 12:53 AM, Deepak kum

Re: ZipAggregationStrategy with persistent store

2016-05-13 Thread Quinn Stevenson
Please forgive me, but I’m missing something. I understand that the behavior of the ZipAggregationStrategy in failure scenarios doesn’t work for you, but I don’t understand what the LevelDB persistent store brings to the table that would help. It seems to me that both the ZipAggregrationStrateg

Re: ZipAggregationStrategy with persistent store

2016-05-12 Thread Quinn Stevenson
The ZipAggregationStrategy is a persistent store (it writes to a file), although I’ve never tested it to see what it does in failure scenarios. Maybe you could use a different aggregation strategy with one of the persistent repositories, and then when you’re competition timeout hits you could us

Re: .choice(), .when() not working as expected in the camel route

2016-05-12 Thread Quinn Stevenson
I tried this route with a test, and I’m not sure where the body is supposed to be set to “Error decoding HL7”. Given I can’t make the route set the body to the required value (unless that’s what I actually send), it looks like the choice is working correctly. Can you insert a log statement rig

Re: Resequencer in distributed environment

2016-05-12 Thread Quinn Stevenson
I had a similar situation with one implementation - we weren’t using the resequencer, but we required FIFO processing and we wanted to have the consumers/processers distributed across multiple containers. Since we required FIFO, only one of the deployed components could be processing at any giv

Re: Camel netty tcp new instance for each client connection

2016-05-10 Thread Quinn Stevenson
I haven’t tried this myself, but I think you could get the Netty Channel from the exchange property CamelNettyChannel, and use and attribute on the channel to store your information. Another option may be to use a map to store some state, and use the CamelNettyRemoteAddress header as the key fo

Re: Blueprint(Spring) DSL vs JAVA DSL

2016-04-29 Thread Quinn Stevenson
The one case where I think you need to use Java RouteBuilders instead of just processors is the case of a “route template” - the same flow, but different endpoints, beans etc wired into the route. A simple example would be a route that subscribes to a JMS queue and publishes to another queue, c

Re: Blueprint(Spring) DSL vs JAVA DSL

2016-04-27 Thread Quinn Stevenson
In the implementations I’ve done, we use a mix of Java DSL and Blueprint. We have some common RouteBuilders, and we use Blueprint to configure them and wire them into a Camel Context. It’s worked very well for us. We’ve done some similar things using camel-scr, but the configuration got a bit

Re: Memory management

2016-04-25 Thread Quinn Stevenson
If you force a GC after the activity dies-down, is the memory recovered? > On Apr 25, 2016, at 4:01 PM, Jeff Segal wrote: > > I've got a set of routes that make a bunch of web service calls in quick > succession, convert the XML to JSON and then save the results off to > MongoDB. This occurs on

Re: java.lang.IllegalArgumentException: Cannot add component as its already previously added: jms

2016-04-24 Thread Quinn Stevenson
Try adding create=false to the end of the broker URI - i.e vm://localhost?create=false > On Apr 23, 2016, at 5:54 AM, nicolasduminil > wrote: > > Hello, > > I'm trying to run a simple route copying a file content to a JMS destination > with ActiveMQ. here is the code : > > public class MyRou

Re: Loop through the files from FTP server and process

2016-04-19 Thread Quinn Stevenson
The FTP component is a polling consumer, so it will continue to look for files at the location you specify. The FTP component is derived from the File component, so you need to look at the docs for the File component to see the polling configurations. http://camel.apache.org/file2.html

Re: Loop through the files from FTP server and process

2016-04-19 Thread Quinn Stevenson
Can you be more specific about the issue you’re having? It looks like you have the right idea once you complete the ftp URIs and such. BTW - Camel works in pipeline mode by default, so you don’t need the elements in this case. > On Apr 18, 2016, at 2:40 PM, sc wrote: > > I am very new to A

Re: How to stop Camel Context after all files FTP?

2016-04-19 Thread Quinn Stevenson
You could set the sendEmptyMessageWhenIdle=true and then check the body - if it’s null, you didn’t get another file so you could shutdown. > On Apr 19, 2016, at 7:58 AM, polanki wrote: > > I wrote below code to FTP files from remote server. I need to do FTP only one > time and get all files fro

Re: how to hold temporary data to use later.....

2016-04-15 Thread Quinn Stevenson
This sounds like a good application of an aggregator ( http://camel.apache.org/aggregator2.html ) Keep the first lines in the aggregation repository, and then have it complete one the file is uploaded. On completion, you can update the DB. > On Apr 15

Re: Guaranteed file processing - JMS and file producer

2016-04-12 Thread Quinn Stevenson
Is there a reason you’re not using a persistent aggregation repository? If you could share a simplified version of your route, that would help as well. > On Apr 11, 2016, at 4:21 AM, glenn wrote: > > Hi > > I’ve been looking at how to use camel-jms to consume xml from a persistent > queue, d

Re: Camel consuming from multiple queues but with different options

2016-04-11 Thread Quinn Stevenson
I think you’ll need multiple routes as I don’t think you can have to elements in the same route. You can setup your routes so they send to a direct endpoint ( , and then have a for the actual processing. > On Apr 11, 2016, at 5:08 PM, rbkumar88 wrote: > > Hi, > > I am able to split the co

Re: Camel consuming from multiple queues but with different options

2016-04-08 Thread Quinn Stevenson
, but the Camel component > won't let you configure them individually. > > As Quinn mentioned, you'll need to use multiple from's, or multiple routes > that share a sub-routine route. > > -Matt > > On 4/8/16 1:53 PM, Quinn Stevenson wrote: >> I don’

Re: Camel consuming from multiple queues but with different options

2016-04-08 Thread Quinn Stevenson
I don’t think you can put two destinations in the same “from” URI - you’ll need two from URIs. > On Apr 8, 2016, at 12:35 PM, rbkumar88 wrote: > > Hi, > > I am trying to consume from two queues with different options. > > > > But getting the following error > > int with value 3,queue2?conc

Re: Understanding Pooled Connection Factory on ActiveMQ

2016-04-08 Thread Quinn Stevenson
Here's the screenshot - missed it the first time -- View this message in context: http://camel.465427.n5.nabble.com/Understanding-Pooled-Connection-Factory-on-ActiveMQ-tp5780689p5780784.html Sent from the Camel - Users mailing

Re: Understanding Pooled Connection Factory on ActiveMQ

2016-04-08 Thread Quinn Stevenson
Sorry Michele - I missed the configuration in the jmsConfig bean. Also, I should've looked at the screenshot you posted - it shows the 10 consumers, with only one consuming. I ran you're JMS config with a simple consuming route, but I'm seeing all of the consumers working - I don't get any inac

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

2016-04-08 Thread Quinn Stevenson
Something like this should work You probably noticed I cheated a little - I didn’t want to work through all the Blueprint stuff to initialize the HapiContext so I created a factory to do it for me :-) import ca.uhn.hl7v2.DefaultHapiContext; im

Re: Understanding Pooled Connection Factory on ActiveMQ

2016-04-07 Thread Quinn Stevenson
The pooled connection factory is a good idea, and it can be used by both the producer and consumer - but the connection factory doesn’t determine the number of concurrent consumers. > On Apr 7, 2016, at 10:04 AM, Michele > wrote: > > Hi Stevenson, > > I configured component activemq using Po

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. Read file from folder wich main co

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

2016-04-07 Thread Quinn Stevenson
mas > wrote: > > I got it to work without blueprint (in java). Blueprint wiring was a bit too > complex for me. If anyone has a working example I will gladly add it to the > docs. > > Should we add those elements to the xsd? > > Cheers, Thomas. > >> Am 05.0

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

2016-04-05 Thread Quinn Stevenson
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 starting up, >

Re: AMQPComponent routes - running out of UNIX descriptors

2016-04-04 Thread Quinn Stevenson
I don’t use AMQP, so this is guess - but it sounds like the AMQP endpoint is creating a new connection to the destination for every message. I’ve hit similar issues with camel-jms, and I resolve them by using a pooled connection factory. Sorry - not much help from me. Maybe an AMQP expert wil

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

2016-04-04 Thread Quinn Stevenson
As far as I know, Blueprint uses reflection to set properties so there wouldn’t be any need for any changes in camel-blueprint when a component/dataformat gets new properties. What exactly is your issue? > On Apr 4, 2016, at 2:19 AM, Walzer, Thomas > wrote: > > Hi, > > is it possible that

Re: AMQPComponent routes - running out of UNIX descriptors

2016-04-04 Thread Quinn Stevenson
Can you share a small sample route that reproduces the issue? And what version of Camel are you using? > On Apr 4, 2016, at 8:08 AM, michal1988 wrote: > > Hello guys, It is my very beginning with Apache Camel. I have created a > simple component and added few routes. The problem is that every

Re: How to return early from a direct: subroute?

2016-04-03 Thread Quinn Stevenson
would be rather tedious to set up filters (or ) at the > beginning of each step. > > > > Thanks again! > > > > From: Quinn Stevenson [via Camel] > [mailto:ml-node+s465427n5780329...@n5.nabble.com] > Sent: Saturday, April 2, 2016 10:43 PM > To: bocamel >

Re: How to return early from a direct: subroute?

2016-04-02 Thread Quinn Stevenson
What about using a filter? I think that can do what you’re after. > On Apr 2, 2016, at 8:40 PM, bocamel wrote: > > Taariq, > > > > Thank you very much for your response. I think your suggestion is very > interesting, though it was not exactly what I was looking for. > > > > Conceptually

<    1   2   3   4   >