Re: AW: AW: Camel Routing using map message help required

2013-09-30 Thread kraythe .
If you mean a JMS queue you will have a problem doing that because with JMS queues, messages only get picked up by a single consumer so if that consumer filters the message, it is dropped into the ether of nothingness. So that is why it is better routed before the queue. Look at recipient list EIP

Re: Creating routes dynamically like a for()

2013-10-01 Thread kraythe .
Just put the for outside. I do this all the time. for (final String path : paths) { from("file://" + path +"?readlock=changed").to(...) ... } This will create four identical routes other than the file paths. if there are four elements in paths. *Robert Simmons Jr. MSc. - Lead Java Architect @

Re: Apache Camel - Multicast - Is there a 'null' or a similar endpoint ?

2013-10-01 Thread kraythe .
It would work. Multicast doesnt indicate anything more than more than one destination. Those destinations could be two JMS queues, a queue and a log, whatever you like. All your code would do is log the message but if that is what you want then go for it. *Robert Simmons Jr. MSc. - Lead Java Archi

Re: Scala DSL lacks a way to specify return type of language expressions

2013-10-01 Thread kraythe .
Write an implicit conversion. Scala doesnt manage return types much. Its unnecessary baggage. I rather like that and wish I could use it in my work. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin

Re: Creating routes dynamically like a for()

2013-10-03 Thread kraythe .
So why not use the for loop to create as many routes as you want? I use that method frequently. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39* On Wed, Oct 2, 2

Re: Apache Camel - Multicast - Is there a 'null' or a similar endpoint ?

2013-10-03 Thread kraythe .
The aggregated exchange is the one that gets returned and how the aggregated exchange is created depends on the aggregation strategy you use. When a route stops either by calling stop or merely not routing anymore, the exchange on the last part of the route could be considered a reply. In most case

Re: Simulating a periodic producer

2013-10-03 Thread kraythe .
Weird, but call a processor with Thread.sleep() in the process method? Out of curiosity, why would you want to introduce this delay? I would just build the delay into the start of the route using quartz component: http://camel.apache.org/quartz.html *Robert Simmons Jr. MSc. - Lead Java Architec

Re: Apache Camel - war project How to process the Queue and set to another queue?

2013-10-03 Thread kraythe .
You do know that JMS only accepts certain types right? Anything it doesn't understand, like your POJO, will get dropped on the floor. If you serialize your object to JSON before writing to the queue and then back from JSON when reading, it should work fine. *Robert Simmons Jr. MSc. - Lead Java Arc

Re: New Camel Components Considerations

2013-10-06 Thread kraythe .
I am sure they would love to take your code. When can we expect something to look at? ;-) *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39* On Sun, Oct 6, 2013 at

Re: URI Scheme Selections

2013-10-06 Thread kraythe .
Camel URIs are part of the code of camel. They are used to select the component that is being configured in the pipeline. They are not being used to indicate a web siter remotely or other considerations. For example it often throws people out when I write from(" http://www.foo.com?bridgeEndpoint=tr

Re: AW: AW: Camel Routing using map message help required

2013-10-07 Thread kraythe .
choice() .when(simple("${body[CREDITORDEBIT]} == true").to(credit_uri).endChoice() .otherwise().to(debit_uri) .end() *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a3

Re: AW: AW: Camel Routing using map message help required

2013-10-07 Thread kraythe .
-simmons/40/852/a39* On Mon, Oct 7, 2013 at 11:45 AM, kraythe . wrote: > choice() > .when(simple("${body[CREDITORDEBIT]} == true").to(credit_uri).endChoice() > .otherwise().to(debit_uri) > .end() > > *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* > *Auth

Re: Camel routing issue

2013-10-07 Thread kraythe .
Filter has to be first in the route. You can probably only put exception handling and route id before it. The DSL should probably be tighened up for that. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.lin

Re: Problem with mock end points and testing error handling

2013-10-07 Thread kraythe .
Yeah you need to mock and skip and then you need to find the mock endpoint and attach it using the weaving code. So something like this: in your advice: mockEndpointsAndSkip("bean:*"); Then in your test: final String beanURI = "mock:bean:myBean"; assertNotNull(beanURI); // << DONT FORGET THIS or

Creating a Component that Calls Another Component

2013-10-16 Thread kraythe .
Greetings, I want to create a component that calls another component in essence. Specifically I have a remote REST based service that I call. I would like to wrap those calls in a component to reduce the route verbosity we are faced with. That means that I will need a component to call that servic

createRegistry() No longer Called in CamelTestSupport, Docs Wrong

2013-10-30 Thread kraythe .
In reading this url it says that we should override createRegistry() in order to bind additional objects into the registry in a test. unfortunately this doesn't work as the old startup has been changed in favor of the option to initialize per class or per m

Transacted routes without using spring route builder?

2013-11-05 Thread kraythe .
Greetings, I have a route that needs to call a database, read some records, format them and put them into ActiveMQ. Naturally the best way to do this would be to wrap the whole thing in a transacted route. However, I do not want to use SpringXML as a route builder interface at all. I don't think i

Bug in Default Shutdown Strategy?

2013-11-06 Thread kraythe .
I was working on a test in the debugger and the context suddenly shutdown on me, killing my stack frames. So naturally I decided to set the shutdown timeout temporarily to 0 according to the documentation in ShutdownStrategy. /** * Set an timeout to wait for the shutdown to complete.

Re: Transacted routes without using spring route builder?

2013-11-06 Thread kraythe .
onent.html > > And an example using it > http://camel.apache.org/servlet-tomcat-no-spring-example.html > > > > On Wed, Nov 6, 2013 at 5:56 AM, kraythe . wrote: > > Greetings, > > > > I have a route that needs to call a database, read some records, format > > t

Re: createRegistry() No longer Called in CamelTestSupport, Docs Wrong

2013-11-06 Thread kraythe .
amelTestSupport class which works > fine. > > > On Wed, Oct 30, 2013 at 5:29 PM, kraythe . wrote: > > In reading this url <http://camel.apache.org/camel-test.html> it says > that > > we should override createRegistry() in order to bind additional objects > > i

Question About JNDI Registry when Running Camel in JBoss Application Server

2013-11-06 Thread kraythe .
I am running my Camel routes packaged as a WAR in JBoss (Actually EAP 6.1.1 which is JBossAS 7.2 I believe) which is a departure from what I am used to with Servicemix and so on. So I was wondering about the JNDI registry in light of the application server. Does the registry integrate with the JNDI

Re: Questions about oncurrent consumers and activemq

2013-11-06 Thread kraythe .
What is the velocity of the messages arriving at the queue? It might be a single consumer eating them all as fast as they are delivered. You might have a race condition. Try preloading the queue with a lot of messages before starting the route. Id be interested in the results. *Robert Simmons Jr.

Factoring out exception Handling fragments.

2013-11-07 Thread kraythe .
Greetings, I have the following exception handling code on every route that I make. Since it is cut and paste I would love to factor it out into some kind of route fragment that I could use in each route that is using it. Any suggestions on how I could go about this? Direct wont work and the error

Re: Question About JNDI Registry when Running Camel in JBoss Application Server

2013-11-08 Thread kraythe .
rate it out of the box. > > Then its just using those jndi naming when you refer to the services > from the registry. > > There should be api on Camel\s JndiRegistry to bind. > > Not sure if you can do it from InitialContext or from some standard > Java Naming API. > >

Re: Factoring out exception Handling fragments.

2013-11-08 Thread kraythe .
ve a abstract base route builder class where you have shared > onException and whatnot. And then just call super.configure() in your > route classes > > On Thu, Nov 7, 2013 at 10:20 PM, kraythe . wrote: > > Greetings, I have the following exception handling code on every route >

Re: Converter - body with single instance into a List

2013-11-08 Thread kraythe .
Did you try just: from("direct:start").convertBodyTo(List.class).to("mock:result) *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39

Re: Camel routing issue

2013-11-08 Thread kraythe .
I think you need to end the inner split with a .end() call. When you split the route you replace the current body with one of the split bodies and they get executed individually. If you want to do something after that split is processed, you have to end the split and then restore the exchange body

CamelContextLifecycle Has a Glaring Deficiency

2013-11-08 Thread kraythe .
The problem is that if we are using a ServletContextListener (jndi or simple) the lifecycle methods get called after the routes have been built. This prevents the routes from being able to use object in the registry. In specific, I register some configuration information there. To work around this,

How to get JMX running on EAP 6.1.1 (JBoss 7+)

2013-11-08 Thread kraythe .
When I start the camel context, I get the following exceptions: [Server:Local01] 20:30:49,901 INFO [org.apache.camel.component.servletlistener.CamelServletContextListener] (ServerService Thread Pool -- 149) CamelContextServletListener initializing ... [Server:Local01] 20:30:55,152 INFO [org.apac

Perplexing problem with JNDIRegistry

2013-11-20 Thread kraythe .
I have the following code in my project: System.out.println(">> " + config.analyticsDatasourceJNDIName()); System.out.println(String.format(">> %s = %s", KEY_ANALYTICS_DATASOURCE, ictxt.lookup(config.analyticsDatasourceJNDIName(; registry.bind(KEY_ANALYTICS_DATASO

Re: CamelContextLifecycle Has a Glaring Deficiency

2013-11-21 Thread kraythe .
u can add a custom > org.apache.camel.spi.LifecycleStrategy and use its callbacks for when > routes is added. Then you can likely do some init logic there as well. > > > On Sat, Nov 9, 2013 at 3:11 AM, kraythe . wrote: > > The problem is that if we are using a ServletContextListener (jndi or > > simpl

Re: Perplexing problem with JNDIRegistry

2013-11-21 Thread kraythe .
d/update the jndi tree. > > I suggest to google/ask on jboss as forums etc about how to from java > to bind new objects in the jndi tree of the jboss server. > > > On Thu, Nov 21, 2013 at 7:38 AM, kraythe . wrote: > > I have the following code in m

Tracer Should Ignore unprintable output

2013-11-21 Thread kraythe .
When I am running my routes in jboss and tracer is logging I get to a point where I generate an Excel file for the customer and then the tracer vomits blood as it tries to write the unprintable body to the screen. See the log below my sig. I think about how this could be solved and I think the bes

Re: Problem with exception handler (onException) on Camel 2.12.X routes.

2013-11-21 Thread kraythe .
I have found that onException must always be first other than perhaps routeId On Thursday, November 21, 2013, Claus Ibsen wrote: > Can you try switching the order of and > > On Thu, Nov 14, 2013 at 1:11 PM, jguerra > > wrote: > > Hi, > > > > It was just to check on this thread to see whether th

Re: Webservice and JMS on camel

2013-11-24 Thread kraythe .
I don't see anything wrong with your approach though remember that you can make things more asynchronous the more ability you will have to take on volume. For example if you turn your camel route into a web service you lower its ability to be federated. Get things in queues as quickly as possible a

Batch Timeout Question

2013-12-05 Thread kraythe .
Been looking all over the docs for this. If I have an aggregator with a batch timeout of 1000 mills and I am running a batch of 5000 records that takes 15 minutes, the question is would the batch timeout start after the first record received and batch records in 1 second intervals or would it wait

File aggregation and transaction.

2013-12-05 Thread kraythe .
I have a route that I will past below. The route is transacted and I want it to read off a queue and then batch the records into a file. However, if someone murders the server with kill -9 prior to the file being written, I would like all of those records to end up back in the queue to be processed

Re: File aggregation and transaction.

2013-12-06 Thread kraythe .
ok at > http://camel.apache.org/sjms > > > On Fri, Dec 6, 2013 at 2:36 AM, kraythe . > > wrote: > > I have a route that I will past below. The route is transacted and I want > > it to read off a queue and then batch the records into a file. However, > if > > someon

Akka with Camel ... Is Akka Missing the Point?

2013-12-07 Thread kraythe .
As many know I have been using Camel quite a while and I have also been a fan of Scala for a while. Well one of the primary server side components for scala is Akka. Akka says they have camel integration and if you look at their web page, there is indeed documentation[1]. What I am a bit baffled by

Re: Content Based Routing with Camel

2013-12-09 Thread kraythe .
Easiest way is to deserialize with Jackson2 into a JSON Tree and then navigate the tree to get the info. Means you dont need a pojo or mapping but can still fetch the data without resortign to string parsing. I dont know how mature JSONPathc is anyway. We will see if it holds any benefit over going

Re: Is it possible to change the Context body inside Dynamic router Slip ?

2013-12-09 Thread kraythe .
And not desireable either. Let the endpoints do the change for you, not the slip itself. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39

Re: Which expression language to use within Camel Splitter to split a CSV file?

2013-12-09 Thread kraythe .
Probably best to write a custom data format to handle this. Parse the whole file into a list records, where each record starts with the data in the initiator and contains all data up to the next initiator. Writing data formats is not that tough. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA*

Re: Split hierarchical-flat file

2013-12-10 Thread kraythe .
Id write my own data format and suck the records into a format that could be rendered in JSON and then have the marshaller output a list of these json objects. After that its like splitting any other list. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Ma

Re: Which expression language to use within Camel Splitter to split a CSV file?

2013-12-10 Thread kraythe .
Better to write a DataFormat to marshal it and then split the marshaled records. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39

Re: Problem with exception handler (onException) on Camel 2.12.X routes.

2013-12-10 Thread kraythe .
There is little we can do without seeing the route and noting where the exception was thrown. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39

Re: error handling design pattern advice

2013-12-10 Thread kraythe .
Put a splitter in the route to split up the list and forward the split exchanges to route b. In route b handle the items and if one fails you put it in the DLQ, and ignore it. Another route can aggregate to do reporting if it wants. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of:

Re: Problem with exception handler (onException) on Camel 2.12.X routes.

2013-12-11 Thread kraythe .
I suspect you have two exceptions propagating. One occurs in the main body of your route. This causes the onException block to trigger but immediately its bringing up the second exception when trying to process the telemetryFailureProcessor. The second is causing the the onException block to excep

Re: Understanding ActiveMQ consumer with concurrentConsumers

2013-12-11 Thread kraythe .
Each of the consumer routes is brought up concurrently on different threads. They will suck in messages as fast as they can, competing like kids for candy tossed on the middle of a floor. So while thread 1 is waiting 5 seconds, threads 2, 3, 4, 5, ... and so on aren't and grabbing the next message

Re: Inject an endpoint into my route for testing purposes

2013-12-11 Thread kraythe .
Try : http://camel.apache.org/advicewith.html *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 * On Wed, D

Re: Implement readLock with lsof

2013-12-11 Thread kraythe .
try: from("file:/mypath?include=.*\\.xlsx&readLock=changed&delay=" + this.config .fileReadDelay()+ "&moveFailed=Errors&move=Processed") This sets up a locking strategey delay that will fail to get the read lock if the file has been changed within fileReadDelay() milliseconds. When the file is str

Re: Inject an endpoint into my route for testing purposes

2013-12-11 Thread kraythe .
, 2013 at 10:09 AM, kraythe . wrote: > Try : > > http://camel.apache.org/advicewith.html > > *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* > *Author of: Hardcore Java (2003) and Maintainable Java (2012)* > *LinkedIn: **http://www.linkedin.com/pub/robert

Re: Apache Camel File component preMove, move and moveFailed relative rather than absolute

2013-12-11 Thread kraythe .
Its working according to the documentation. try ../done to make done a sibling to staging. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39

Re: Email Alerts Upon FTP Failure

2013-12-12 Thread kraythe .
There is an email component in camel. SMTP specifically. You just have to add a to() line and the appropriate configuration. A CBR is a Content Based Router which is one of the well known Enterprise Integration Patterns. I would advise you to get Camel in Action and read the first 2 chapters befor

Re: Problem with exception handler (onException) on Camel 2.12.X routes.

2013-12-12 Thread kraythe .
I would try to create a unit test using CamelTestSupport and see if i could reproduce the issue before going further. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a

Re: Facing problem in regex when used in Simple Expression Language

2013-12-13 Thread kraythe .
${file:name.noext}.regex '([^_]*).*'.${file:ext} Regex is a method call on the string return from the file:name.noext *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852

Re: camel for "short" programs

2013-12-14 Thread kraythe .
Indeed. Though you could use it to start up and shut down, nothing stopping you. I would not opt for that choice if I had some sort of deployment system where I could keep the routes running. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Jav

Re: different context

2013-12-14 Thread kraythe .
Try out this article: https://weblogs.java.net/blog/manningpubs/archive/2013/02/13/akka-and-camel You can init the Akka Camel context with spring and get the best of both worlds. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *

Re: camel for "short" programs

2013-12-16 Thread kraythe .
;>> On Sat, Dec 14, 2013 at 4:00 PM, Romain Manni-Bucau > >>>> wrote: > >>>>> Hmm, so if I understand you camel will not solve it. I find it sad > cause > >>>>> camel pipeline and the numerous components are 2 tempting things for > >>&

Re: Help need on exception java.lang.IncompatibleClassChangeError: org.apache.neethi.AssertionBuilderFactory

2013-12-16 Thread kraythe .
Check to see that you arent running classes compiled for 1.7 on an older VM like 1.5. If that isnt the issue, Id suggest asking CXF gurus. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/ro

Re: Does camel support SUSE linux OS?

2013-12-16 Thread kraythe .
It will run fine on any system with a JVM. So the question is what do you mean by "support" *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39

Re: Help apache camel jdbc + active

2013-12-16 Thread kraythe .
As said above. Use quartz or an AMQ event to trigger it. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 *

Re: Unable to stop the route

2013-12-16 Thread kraythe .
Or look into why your processor is hanging. Camel tries to gracefully shutdown so it wont kill exchanges in process until the timeout occurs. So 90% of "my context doesnt shutdown forever" are issues in your route where exchanges are hanging up. Turn on tracer and look into your processor to see wh

Re: ConsumerTemplate is not fetching data in insertion Order

2013-12-16 Thread kraythe .
Since JMS is asynchrous this is expected. Why do you need them in a specific order? If you really do then I would put an aggregator on the consuming route and write an aggregation strategy that would enforce order. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (200

Re: camel for "short" programs

2013-12-16 Thread kraythe .
ready. > > Another thing is it makes camel not really well usable in jbatch readers > (not a big deal)...but same applies in spring-batch (released and worse in > fact since timeout is not handled). So camel should drop this code instead > of keeping it IMHO. > Le 16 déc. 2013 18:40

Re: Why Pass Java object in Twitter (& other) component

2013-12-16 Thread kraythe .
The only real reason not to put an object of type X in an exchange is the need to convert in and out of the type. I dont think POJO mapping all json is a useful thing but there are many canonical data formats that can accomplish the same thing (such as a map). The only thing you have to keep in min

Re: Acknowledgement to JMS Topic on activemq

2013-12-17 Thread kraythe .
look at http://camel.apache.org/sjms.html component. The SJMS component supports transacted routes which is what you want here. But you will need a durable subscriber to the topic to make it work. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainabl

Re: Problem with exception handler (onException) on Camel 2.12.X routes.

2013-12-17 Thread kraythe .
I have no idea beyond what I told you I am afraid. I use exception handlers extensively in 2.12 routes and they work great. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40

Re: RecipientList or DynamicRouter or RoutingSlip

2013-12-21 Thread kraythe .
Typically you would use a recipient list if there are potentially more than one receiver or if the receiver is not known at compile time. So if you have a record where the receiver is calculated off some data from another system you would use a recipient list. If you have known routing situation at

Re: polling consumer with acknowledgement

2013-12-21 Thread kraythe .
I don't think the question is quite clear. In JMS you can only consume a message off a queue once. You can't consume it and leave it on the queue. Why do want to not ack the message? Queues are like throwing candy into a room of kindergarten children. All will scramble for the candy but each piece

Re: polling consumer with acknowledgement

2013-12-21 Thread kraythe .
end ack later is, in case my application goes down post message > consumption and before writing to datastore, i should be able to fetch same > message again from JMS queue. Hope that clarifies. > > Thanks! > > > > On Sat, Dec 21, 2013 at 9:14 PM, kraythe . > > wrote: &

Re: Can Camel process PGP files which would exceed available JVM memory?

2013-12-21 Thread kraythe .
PGP cannot be processed unless the memory exists. I don't know of an in-stream component like you are talking about. You could write one with bouncy castle or make a code addition to the existing components to read from a stream. Then you could submit that back to the community. ;) On Friday, Dece

Re: FuseIDE in combination with routeContext elements from external files

2013-12-23 Thread kraythe .
That brings up the interesting question of why even use FUSE at all if they are still running 2.9 and their update speed makes turtles look fast. Honestly working with the straight code and, if you must do redhat, in straight JBoss is easier and more flexible. *Robert Simmons Jr. MSc. - Lead Java

Re: compatible version of apache cxf, spring and camel

2013-12-23 Thread kraythe .
If you are building with maven, use 'mvn dependency:tree' and look for CXF dependency. It would vary depending upon what version of camel you are using. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linke

Re: Aggregator, beyond the simple string example

2013-12-23 Thread kraythe .
I think I can share this one. .. its a pretty mundane one I've used in more than one company. public class ListAggregationStrategy implements AggregationStrategy { /** The comparator used to keep the list sorted if any. */ final Comparator comparator; /** * @param comparator The comparat

Re: Route message based on Tag Value - Apache Camel Spring

2013-12-23 Thread kraythe .
This page will probably help. http://camel.apache.org/xpath.html *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39

Re: polling consumer with acknowledgement

2013-12-23 Thread kraythe .
Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Mon, Dec 23, 2013 at 2:11 AM, Tarun Kumar wrote: > Hi Kraythe, > > Thanks for replying.

Re: RecipientList or DynamicRouter or RoutingSlip

2013-12-23 Thread kraythe .
not a good idea. Wiretap makes a copy of an exchange and is used for things like logging and monitoring. You are using a wrench to cut down a tree. You might cut it down but the next guy will have no idea why the wrench is the tool. Use the right tool, either recipient list or dynamic router. *Rob

Re: Problem with exception handler (onException) on Camel 2.12.X routes.

2013-12-23 Thread kraythe .
Uhh probably not. Proprietary code you know. I would look for another problem. I know the exception handlers are working fine so if you say you are getting an exception without even the processor in the route, its time to turn the tracer to max and pretend you are the computer. Something weird is g

Re: Processing Error queue and handling them appropriately

2013-12-23 Thread kraythe .
Weird question. There are a billion ways to do this. it depends upon your base requirements. Typically you consume from the queue and invoke some logic in the route and then pass off the results to another system. What are your actual requirements? *Robert Simmons Jr. MSc. - Lead Java Architect @

Unique instance per route but shared on the route.

2013-12-23 Thread kraythe .
Here is a tricky question. I have a route that is defined with concurrent consumers. Currently it creates a single instance of a data format and then uses it in the route several times: public void configureARoute() { final ObjectMapper mapper = mapperBuilderMethod(); final JacksonDataFormat

Re: Unique instance per route but shared on the route.

2013-12-24 Thread kraythe .
it is. The problem we have is indicative of a race condition. On Tuesday, December 24, 2013, Richard Kettelerij wrote: > What's your concern with Jackson ObjectMappers? These actually are > thread-safe, see http://wiki.fasterxml.com/JacksonFAQThreadSafety. > > > On Mon, Dec

Re: Message properties missing after Camel - rabbitmq routing

2014-01-02 Thread kraythe .
I would guess that RabbitMQ is using their own headers for this and you are removing those headers in your route when you call . Try removing that line and debugging and see if you find them. Then use exclude patterns to make sure you dont remove the ones you need. *Robert Simmons Jr. MSc. - Lead

Re: Failed to create route

2014-01-02 Thread kraythe .
You have to register a transaction policy in the registry and with the transaction manager. In straight java it looks like this. final JmsTransactionManager txMgr = new JmsTransactionManager(amqcf); registry.bind(KEY_AMQ_TXMANAGER, txMgr); final SpringTransactionPolicy txPolicyRequired

Re: Asynchronous processing of routes

2014-01-02 Thread kraythe .
Try splitting up routes more and using ActiveMQ or another broker in between the routes. So instead of "waiting for the message to arrive" consume the message with a route and resume programming perhaps enriching with other messages from other sources. You can also create an aggregation strategy th

Re: suspend and resume routes

2014-01-02 Thread kraythe .
You can connect to JMX port of camel to accomplish this. There are a couple of user interfaces that use web technology such as Hawtio. Writing one would also not be that big of a deal. See the following link: http://camel.apache.org/camel-jmx.html *Robert Simmons Jr. MSc. - Lead Java Architect @

Re: Need for XA?

2014-01-03 Thread kraythe .
XA transactions are usually only needed if you have multisystem transactions to be coordinated. So if you read from a JMS queue and because of that store a message in a database then send a message on to another queue, you want both the DB and the JMS to roll back if there is a 500 error calling a

Re: Need for XA?

2014-01-04 Thread kraythe .
the camel page on transactions shows you how to do an XA transaction manager. :) *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39

Re: Asynchronous processing of routes

2014-01-05 Thread kraythe .
The interesting thing is that you don't have to do synchronous request reply to have a route processing flow with a defined order. Consider a route like the following: from("jms:queue:input").to("jms:queue:processA").to("jms:queue:processB").to("jms:queue:results") And the helper routes: from("j

Re: What organizations are using Camel?

2014-01-07 Thread kraythe .
EA uses Camel for a number of things I am not at liberty to discuss. Some things I can talk about in general terms though. We process several thousand customer support cases using Camel routes. Also Comcast cable uses it to process Streaming Video On Demand (SVOD) content and is working to replace

Re: Stream consuming in Camel

2014-01-07 Thread kraythe .
You could write your own consumer to do this if you wanted and nothing else fit. Camel is very extensible so it allows you to do custom things and transparently marry those things with EIP and camel routes. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and M

Re: ActiveMQ processing

2014-01-07 Thread kraythe .
Write two routes: one that writes to a JMS queue and one that picks up data off the queue and processes it: from("direct:input").to("activemq:queue:inbox"); from("activemq:queue:inbox"). . to("activemq:queue:results"); This manner you can shove data in as fast as you want and even have concurren

2.12 Incompatible with Camel Restlet Component?

2014-01-16 Thread kraythe .
Greetings, I wanted to create a little rest let demo but when I tried to run it I got an odd spring exception. It seems that rest let depends on older spring jars than Camel does and this causes confusion. Anyone have an idea how to work around this? The exception and the maven dependency tree ar

Re: 2.12 Incompatible with Camel Restlet Component?

2014-01-17 Thread kraythe .
a39>* On Fri, Jan 17, 2014 at 1:41 AM, Claus Ibsen wrote: > Try excluding those old spring jars in the restlet-spring dependency > and make sure to run with only the newer and same spring version. > > On Thu, Jan 16, 2014 at 11:23 PM, kraythe . wrote: > > Greetings, >

Re: Unit Testing Question

2014-01-17 Thread kraythe .
There are a number of examples on the camel testing page. However I can provide perhaps some information. Mock endpoints are just recorders of information the previous poster used in example. Normally an endpoint doesn't keep track of what exchanges go through it but mock ones do. You can also mock

Re: JVM is running out of memory during full Camel build

2014-01-17 Thread kraythe .
Make sure, also, in your maven pom that i you are forking the VM for testing that you provide the forked VM with enough memory. The Maven opts will not be propagated to the forked VM so beware of that. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Mainta

Re: 2.12 Incompatible with Camel Restlet Component?

2014-01-17 Thread kraythe .
dcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Fri, Jan 17, 2014 at 8:57 AM, kraythe . wrote: > I will give that a shot and let you know how it turns ou

Re: 2.12 Incompatible with Camel Restlet Component?

2014-01-17 Thread kraythe .
-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Fri, Jan 17, 2014 at 10:31 AM, Claus Ibsen wrote: > what do you need restlet-spring for? What does it bring to the table? > > On Fri, Jan 17, 2014 at 5:25 PM, kraythe . wrote: > > Actually that di

Re: Consuming multiple JMS messages in one single transaction

2014-02-01 Thread kraythe .
This question gets asked enough that perhaps there should be some text added to the JMS documentation on the matter. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a3

Can I use a Servlet 3.0 Web.xml with camel-servletlistener 2.12.1

2014-02-05 Thread kraythe .
Greetings, We are using servletlistener to bootstrap camel into a web app deployed on JBoss EAP 6.2 and I was wondering if I could use a servlet 3.0 spec web.xml with the servletlistener even though the listener is only compiled against geronimo 2.5 spec? Thanks in advance. *Robert Simmons Jr. M

Re: Consuming messages with casting problems

2014-02-06 Thread kraythe .
Its always best to serialize objects going through AMQ into JSON, XML or some other means. Not only does it reduce the problems of compatible JAR files (because they would have to be the SAME jar files on both sides), it also makes messages in the queue easier to read when that becomes necessary. A

  1   2   3   >