Jms endpoint: process messages in parallel, but keeping predefined order

2011-06-14 Thread Alexey Vinogradov
I need to solve the following problem: There is JMS queue where the messages are consumed from. Each message has business Id and version. The task is to process messages in parallel, but messages with the same ID should be processed in the order defined by version. The processing should be reliable

Re: startupOrder() on a route

2011-06-14 Thread bvahdat
Hi Claus, Now it's clear! I'll definitely buy you a beer the first time I should meet you... Regards, Babak -- View this message in context: http://camel.465427.n5.nabble.com/startupOrder-on-a-route-tp4476368p4487095.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Jms endpoint: process messages in parallel, but keeping predefined order

2011-06-14 Thread Claus Ibsen
Hi Read about message groups http://activemq.apache.org/message-groups.html http://activemq.apache.org/how-do-i-preserve-order-of-messages.html On Tue, Jun 14, 2011 at 9:46 AM, Alexey Vinogradov wrote: > I need to solve the following problem: > There is JMS queue where the messages are consumed

TransactionErrorHandler, JMS, configuring retries

2011-06-14 Thread janne postilista
I have routes that read from JMS queue and write to another queue and do some processing in between. Queues are in external ActiveMQ server. I am confused about how error handling and configuring for example retries is configured. - my route is marked and because of that, it uses TransactionErro

Rejecting JMS messages on camel route update.

2011-06-14 Thread Joshua Watkins
I was using ActiveMQ 5.5 with Camel 2.7.0 and during a update of the route lost some messages and found this error in the log 2011-06-13 13:25:42,950 | INFO | Starting to graceful shutdown 1 routes (timeout 300 seconds) | org.apache.camel.impl.DefaultShutdownStrategy | qtp788458698-45 2011-06-13

Re: Jms endpoint: process messages in parallel, but keeping predefined order

2011-06-14 Thread Alexey Vinogradov
Hi Claus, These message groups look very similar to the solution with JMS selectors. Dividing ID's into a number of non intersecting subsets. Creating the same number of single-thread consumers with selectors will guarantee that the messages with same ID will be processed sequentially by the same

Re: Multi-threading query

2011-06-14 Thread woggle23
I was hoping there would be some form of mutual exclusion lock that I could enclose the pertinent elements of my route in (within the dsl statement). Howsoever, the alternative option you mention "detect that the 1st route is active". By active do you "not suspended" or "is currently routing a m

Re: startupOrder() on a route

2011-06-14 Thread Claus Ibsen
On Tue, Jun 14, 2011 at 10:12 AM, bvahdat wrote: > Hi Claus, > > Now it's clear! > > I'll definitely buy you a beer the first time I should meet you... > Looking forward to that beer and have a talk :) > Regards, Babak > > -- > View this message in context: > http://camel.465427.n5.nabble.com/

Re: Multi-threading query

2011-06-14 Thread Claus Ibsen
On Tue, Jun 14, 2011 at 1:09 PM, woggle23 wrote: > I was hoping there would be some form of mutual exclusion lock that I could > enclose the pertinent elements of my route in (within the dsl statement). > You can use a routePolicy which can help dictate when a route is online. The Camel in Action

Re: Rejecting JMS messages on camel route update.

2011-06-14 Thread Claus Ibsen
Hi There is an option on JMS endpoint, acceptMessagesWhileStopping http://camel.apache.org/jms If you have ActiveMQ embedded in the same JVM and its all Spring XML that set it up, then you need to mess with Spring to tell it to stop Camel before ActiveMQ etc. There is unfortunately not so many o

Re: TransactionErrorHandler, JMS, configuring retries

2011-06-14 Thread Claus Ibsen
On Tue, Jun 14, 2011 at 12:45 PM, janne postilista wrote: > I have routes that read from JMS queue and write to another queue and > do some processing in between. Queues are in external ActiveMQ server. > > I am confused about how error handling and configuring for example > retries is configured.

Re: Multi-threading query

2011-06-14 Thread Hadrian Zbarcea
You can also let the update happen and handle the Exception that will follow. This is an application level problem. Hadrian On 06/14/2011 02:27 AM, Claus Ibsen wrote: On Mon, Jun 13, 2011 at 1:08 PM, woggle23 wrote: Morning Team I have a system with 2 routes similar to the following: HTTP

Re: Rejecting JMS messages on camel route update.

2011-06-14 Thread Joshua Watkins
The configuration I am using is the built in camel that comes with ActiveMQ. (So stand alone broker with the Camel enabled from enabling Jetty.) Additionally, I got the warning when starting and stopping the route via the camel web console. With that said, I don't think there is much spring work I

osgi - Two classes have the same XML type name

2011-06-14 Thread Marco Gerber
Hello everybody (this message cross posts http://camel.465427.n5.nabble.com/osgi-Two-classes-have-the-same-XML-type-name-td4487885.html - sorry I didn't see the users list before) I'm using camel 2.7.0 in an spring- osgi context with Spring Source Toolsuite STS 2.6.1. I got many of the followi

Redelivery is not disabled when maximumRedeliveries is set to 0

2011-06-14 Thread Morten Holm
Hi Redelivery is not disabled when maximumRedeliveries is set to 0. I experience that one redelivery is always attempted. The errorhandler looks like this. http://camel.apache.org/schema/spring"; id="failedMessagesErrorHandler" type="DeadLetterChannel" deadLetterUri

Re: Redelivery is not disabled when maximumRedeliveries is set to 0

2011-06-14 Thread preben
Hi Morten I think you should configure redelivery policy on your jms connection factory. If you are using ActiveMQ look at http://activemq.apache.org/redelivery-policy.html /preben -- View this message in context: http://camel.465427.n5.nabble.com/Redelivery-is-not-disabled-when-maximumRedelive

Re: Redelivery is not disabled when maximumRedeliveries is set to 0

2011-06-14 Thread Claus Ibsen
On Tue, Jun 14, 2011 at 5:34 PM, preben wrote: > Hi Morten > > I think you should configure redelivery policy on your jms connection > factory. If you are using ActiveMQ look at > http://activemq.apache.org/redelivery-policy.html > Yeah if your JMS broker supports dead letter queues, then conside

Re: Redelivery is not disabled when maximumRedeliveries is set to 0

2011-06-14 Thread Claus Ibsen
On Tue, Jun 14, 2011 at 5:08 PM, Morten Holm wrote: > Hi > > Redelivery is not disabled when maximumRedeliveries is set to 0. I experience > that one redelivery is always attempted. > > The errorhandler  looks like this. > >        http://camel.apache.org/schema/spring"; > id="failedMessagesErro

RE: CXF + Camel + JMS Endpoint exception handling

2011-06-14 Thread Sven Zethelius
For now I've written a simple bridging interceptor that forwards the exception on to Camel. I ended up going for a Camel errorHandler instead of transactions, but both need the exception exposed to Camel Exchange. If CamelDestination doesn't expose the exception, the errorHandler doesn't get

Re: Redelivery is not disabled when maximumRedeliveries is set to 0

2011-06-14 Thread Morten Holm
On Tue, Jun 14, 2011 at 6:13 PM, Claus Ibsen wrote: > On Tue, Jun 14, 2011 at 5:08 PM, Morten Holm wrote: > > Hi > > > > Redelivery is not disabled when maximumRedeliveries is set to 0. I > experience that one redelivery is always attempted. > > > > The errorhandler looks like this. > > > >

jms queue endpoint message parameters

2011-06-14 Thread fachhoch
I have my route with endpoint to jms queue, here from("file://e:/u01/oracle/NEW_NEAR_FILES/?delay=6&move=../PROCESSED_NEAR_FILES") .convertBodyTo(String.class) .aggregate(constant(true)).completionSize(10).completionTimeout(1L).groupExchanges()

Re: jms queue endpoint message parameters

2011-06-14 Thread boday
in the FileProcessor, just call exchange.getIn().setBody()...the body of the exchange will be used for to create the JMS message, etc... fachhoch wrote: > > I have my route with endpoint to jms queue, > > here > > > > from("file://e:/u01/oracle/NEW_NEAR_FILES/?delay=6&move=../PROC

Re: Timer period

2011-06-14 Thread boday
I've done this with http://camel.apache.org/properties.html camel-properties ... basically this... PropertiesComponent pc = new PropertiesComponent(); pc.setLocation("classpath:myprops.properties"); context.addComponent("properties", pc); from("timer://springTimer?fixedRate=true&period={{fetchT

Re: Camel-cxf method calling

2011-06-14 Thread boday
here is an example that shows how to setup the route and detect the operation being called... https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerTest.java - Ben O'Day IT Consultant -http://consulting-notes.com -- View thi