Re: Exception not getting caught and multiple consumers getting the same message

2011-10-11 Thread Claus Ibsen
On Mon, Oct 10, 2011 at 8:04 PM, Aaron Doyle  wrote:
> I figured out what the problem was, and the problem wasn't with Camel, it was 
> me.  Was doing something stupid in my web service that was causing the 
> problem.  Thanks so much for the quick responses and feedback.
>

Glad for sharing with us you found the cause of the problem.



> Best Regards,
> Aaron
>
>
> 
> From: Aaron Doyle 
> To: "users@camel.apache.org" ; Aaron Doyle 
> 
> Sent: Friday, October 7, 2011 12:00 PM
> Subject: Re: Exception not getting caught and multiple consumers getting the 
> same message
>
> my properties values did not display correctly, they are
> messageQueueURI=tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=1
> loaderServiceURI=spring-ws:http://localhost:8080/LoaderService
>
>
>
> 
> From: Aaron Doyle 
> To: "users@camel.apache.org" 
> Sent: Friday, October 7, 2011 11:55 AM
> Subject: Re: Exception not getting caught and multiple consumers getting the 
> same message
>
> I tried the handleFault=true attribute and that did not enable the exceptions 
> to get caught.
>
> The exceptions are caught when running one consumer, as soon as I increase 
> the number of consumers, exceptions are not caught and messages start getting 
> lost. I noticed that all 50 consumers are sharing the same connection, 
> whereas I would think that all consumers get there own connection...  Adding 
> a doTry/doCatch around the 'to' section of my route, does catch most of the 
> exceptions but still some messages seem to get lost... Is there any way with 
> 1 consumer that I can process multiple messages asynchronously?  Or that I 
> can force each consumer to get its own connection?  Has anyone else 
> experienced problems running multiple consumers off a message queue and 
> sending the messages to a spring-ws component?
>
>
> Here is my latest configuration:
> ** Note below 2 lines from my properites 
> file.tcploaderServiceURIspring-ws:http://localhost:8080/LoaderService=://localhost:61616?jms.prefetchPolicy.queuePrefetch=1
>
>  class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>     
>     
>     
>     classpath:environment.properties
>     
>     
>
>      class="org.apache.activemq.ActiveMQConnectionFactory">
>    
>     
>
>      class="org.apache.activemq.pool.PooledConnectionFactory">
>    
>    
>    
>     
>
>      class="org.apache.camel.component.jms.JmsConfiguration">
>    
>    
>     
>
>          class="org.apache.activemq.camel.component.ActiveMQComponent">
>     
>     
>
>      xmlns="http://camel.apache.org/schema/spring";>
>
>     
>
>     
>     java.lang.Exception
>      maximumRedeliveries="2" />
>             true
>     
>     
>
>     
>     
>     
>     
>
>     
>
>
> 
> From: Claus Ibsen 
> To: "users@camel.apache.org" 
> Sent: Tuesday, October 4, 2011 11:50 AM
> Subject: Re: Exception not getting caught and multiple consumers getting the 
> same message
>
> Could it be the spring-ws client returns a SOAP Fault and not an exception?
> Camel error handler only reacts upon exceptions.
>
> There is a flag you can enable on the route, handleFault=true, that
> turns SOAP faults into exceptions,
> and allow Camel error handler to react then.
>
> On Mon, Oct 3, 2011 at 2:16 PM, Aaron Doyle  wrote:
>> Hello,
>>
>> That did not seem to help fix my problem.  If I change my route to the
>> following, the exception is caught and sent to the loadable failure queue.
>>
>> 
>>  
>>  
>>  
>>  
>> 
>>  
>> 
>>  
>> Is there any way to do a redelivery with the doTry/doCatch?
>>
>> Back to the onException problem
>> The problem seems to be specific to a spring ws client.  The bean
>> 'loaderServiceClient' is a spring ws client and the exceptions do not get
>> handled, if I replace the 'to' uri with
>> 'spring-ws:ht

Re: Exception not getting caught and multiple consumers getting the same message

2011-10-10 Thread Aaron Doyle
I figured out what the problem was, and the problem wasn't with Camel, it was 
me.  Was doing something stupid in my web service that was causing the 
problem.  Thanks so much for the quick responses and feedback.  
 
Best Regards,
Aaron



From: Aaron Doyle 
To: "users@camel.apache.org" ; Aaron Doyle 

Sent: Friday, October 7, 2011 12:00 PM
Subject: Re: Exception not getting caught and multiple consumers getting the 
same message

my properties values did not display correctly, they are
messageQueueURI=tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=1
loaderServiceURI=spring-ws:http://localhost:8080/LoaderService
 



From: Aaron Doyle 
To: "users@camel.apache.org" 
Sent: Friday, October 7, 2011 11:55 AM
Subject: Re: Exception not getting caught and multiple consumers getting the 
same message

I tried the handleFault=true attribute and that did not enable the exceptions 
to get caught.  
 
The exceptions are caught when running one consumer, as soon as I increase the 
number of consumers, exceptions are not caught and messages start getting 
lost. I noticed that all 50 consumers are sharing the same connection, whereas 
I would think that all consumers get there own connection...  Adding a 
doTry/doCatch around the 'to' section of my route, does catch most of the 
exceptions but still some messages seem to get lost... Is there any way with 1 
consumer that I can process multiple messages asynchronously?  Or that I can 
force each consumer to get its own connection?  Has anyone else experienced 
problems running multiple consumers off a message queue and sending the 
messages to a spring-ws component?
 
 
Here is my latest configuration:
** Note below 2 lines from my properites 
file.tcploaderServiceURIspring-ws:http://localhost:8080/LoaderService=://localhost:61616?jms.prefetchPolicy.queuePrefetch=1
 

    
    
    
    classpath:environment.properties
    
    
 
    
   
    
 
    
   
   
   
    
 
    
   
   
    
 
    
    
    
 
    http://camel.apache.org/schema/spring";>
 
    
 
    
    java.lang.Exception
    
    true
    
    
 
    
    
    
    
 
    



From: Claus Ibsen 
To: "users@camel.apache.org" 
Sent: Tuesday, October 4, 2011 11:50 AM
Subject: Re: Exception not getting caught and multiple consumers getting the 
same message

Could it be the spring-ws client returns a SOAP Fault and not an exception?
Camel error handler only reacts upon exceptions.

There is a flag you can enable on the route, handleFault=true, that
turns SOAP faults into exceptions,
and allow Camel error handler to react then.

On Mon, Oct 3, 2011 at 2:16 PM, Aaron Doyle  wrote:
> Hello,
>
> That did not seem to help fix my problem.  If I change my route to the
> following, the exception is caught and sent to the loadable failure queue.
>
> 
>  
>  
>  
>  
> 
>  
> 
>  
> Is there any way to do a redelivery with the doTry/doCatch?
>
> Back to the onException problem
> The problem seems to be specific to a spring ws client.  The bean
> 'loaderServiceClient' is a spring ws client and the exceptions do not get
> handled, if I replace the 'to' uri with
> 'spring-ws:http://server.com:8080/service' the exception does not get
> handled either.  If I replace the 'to' uri with a test pojo where the method
> being called explicitly throws an exception, the exceptions are caught and
> handled by the onException.  Is it possible that there is something in the
> Spring WS Client that is eating the exception
>
> Lastly, on the second part of my question from first email, does it seem
> possible that I have multiple consumers grabbing the same message off of the
> queue to load (which is what is causing the exception to be thrown.)  If I
> run with 1 consumer, it runs without exceptions.
>
> -Aaron
> From: Claus Ibsen 
> To: users@camel.apache.org; Aaron Doyle 
> Sent: Monday, October 3, 2011 3:48 AM
> Subject: Re: Exception not getting caught and multiple consumers getting the
> same message
>
> Hi
>
> You need to add true to your
>  to indicate you are handling this exception.
>
>
> On Sun, Oct 2, 2011 at 2:57 PM, Aaron Doyle  wrote:
>> Sorry bout that, hopefully this is better.
>>
>>
>> Me

Re: Exception not getting caught and multiple consumers getting the same message

2011-10-07 Thread Aaron Doyle
my properties values did not display correctly, they are
messageQueueURI=tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=1
loaderServiceURI=spring-ws:http://localhost:8080/LoaderService
 



From: Aaron Doyle 
To: "users@camel.apache.org" 
Sent: Friday, October 7, 2011 11:55 AM
Subject: Re: Exception not getting caught and multiple consumers getting the 
same message

I tried the handleFault=true attribute and that did not enable the exceptions 
to get caught.  
 
The exceptions are caught when running one consumer, as soon as I increase the 
number of consumers, exceptions are not caught and messages start getting 
lost. I noticed that all 50 consumers are sharing the same connection, whereas 
I would think that all consumers get there own connection...  Adding a 
doTry/doCatch around the 'to' section of my route, does catch most of the 
exceptions but still some messages seem to get lost... Is there any way with 1 
consumer that I can process multiple messages asynchronously?  Or that I can 
force each consumer to get its own connection?  Has anyone else experienced 
problems running multiple consumers off a message queue and sending the 
messages to a spring-ws component?
 
 
Here is my latest configuration:
** Note below 2 lines from my properites 
file.tcploaderServiceURIspring-ws:http://localhost:8080/LoaderService=://localhost:61616?jms.prefetchPolicy.queuePrefetch=1
 

    
    
    
    classpath:environment.properties
    
    
 
    
   
    
 
    
   
   
   
    
 
    
   
   
    
 
    
    
    
 
    http://camel.apache.org/schema/spring";>
 
    
 
    
    java.lang.Exception
    
    true
    
    
 
    
    
    
    
 
    



From: Claus Ibsen 
To: "users@camel.apache.org" 
Sent: Tuesday, October 4, 2011 11:50 AM
Subject: Re: Exception not getting caught and multiple consumers getting the 
same message

Could it be the spring-ws client returns a SOAP Fault and not an exception?
Camel error handler only reacts upon exceptions.

There is a flag you can enable on the route, handleFault=true, that
turns SOAP faults into exceptions,
and allow Camel error handler to react then.

On Mon, Oct 3, 2011 at 2:16 PM, Aaron Doyle  wrote:
> Hello,
>
> That did not seem to help fix my problem.  If I change my route to the
> following, the exception is caught and sent to the loadable failure queue.
>
> 
>  
>  
>  
>  
> 
>  
> 
>  
> Is there any way to do a redelivery with the doTry/doCatch?
>
> Back to the onException problem
> The problem seems to be specific to a spring ws client.  The bean
> 'loaderServiceClient' is a spring ws client and the exceptions do not get
> handled, if I replace the 'to' uri with
> 'spring-ws:http://server.com:8080/service' the exception does not get
> handled either.  If I replace the 'to' uri with a test pojo where the method
> being called explicitly throws an exception, the exceptions are caught and
> handled by the onException.  Is it possible that there is something in the
> Spring WS Client that is eating the exception
>
> Lastly, on the second part of my question from first email, does it seem
> possible that I have multiple consumers grabbing the same message off of the
> queue to load (which is what is causing the exception to be thrown.)  If I
> run with 1 consumer, it runs without exceptions.
>
> -Aaron
> From: Claus Ibsen 
> To: users@camel.apache.org; Aaron Doyle 
> Sent: Monday, October 3, 2011 3:48 AM
> Subject: Re: Exception not getting caught and multiple consumers getting the
> same message
>
> Hi
>
> You need to add true to your
>  to indicate you are handling this exception.
>
>
> On Sun, Oct 2, 2011 at 2:57 PM, Aaron Doyle  wrote:
>> Sorry bout that, hopefully this is better.
>>
>>
>> Message body
>>
>> http://www.springframework.org/schema/beans;
>> xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
>> xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsd
>> http://camel.apache.org/schema/springhttp://camel.apache.org/schema/spring/camel-spring.xsd";;>
>>
>>
>> 
>>     
>>     
>>     
>>

Re: Exception not getting caught and multiple consumers getting the same message

2011-10-07 Thread Aaron Doyle
I tried the handleFault=true attribute and that did not enable the exceptions 
to get caught.  
 
The exceptions are caught when running one consumer, as soon as I increase the 
number of consumers, exceptions are not caught and messages start getting 
lost. I noticed that all 50 consumers are sharing the same connection, whereas 
I would think that all consumers get there own connection...  Adding a 
doTry/doCatch around the 'to' section of my route, does catch most of the 
exceptions but still some messages seem to get lost... Is there any way with 1 
consumer that I can process multiple messages asynchronously?  Or that I can 
force each consumer to get its own connection?  Has anyone else experienced 
problems running multiple consumers off a message queue and sending the 
messages to a spring-ws component?
 
 
Here is my latest configuration:
** Note below 2 lines from my properites 
file.tcploaderServiceURIspring-ws:http://localhost:8080/LoaderService=://localhost:61616?jms.prefetchPolicy.queuePrefetch=1
 

    
    
    
    classpath:environment.properties
    
    
 
    
   
    
 
    
   
   
   
    
 
    
   
   
    
 
    
    
    
 
    http://camel.apache.org/schema/spring";>
 
    
 
    
    java.lang.Exception
    
    true
    
    
 
    
    
    
    
 
    



From: Claus Ibsen 
To: "users@camel.apache.org" 
Sent: Tuesday, October 4, 2011 11:50 AM
Subject: Re: Exception not getting caught and multiple consumers getting the 
same message

Could it be the spring-ws client returns a SOAP Fault and not an exception?
Camel error handler only reacts upon exceptions.

There is a flag you can enable on the route, handleFault=true, that
turns SOAP faults into exceptions,
and allow Camel error handler to react then.

On Mon, Oct 3, 2011 at 2:16 PM, Aaron Doyle  wrote:
> Hello,
>
> That did not seem to help fix my problem.  If I change my route to the
> following, the exception is caught and sent to the loadable failure queue.
>
> 
>  
>  
>  
>  
> 
>  
> 
>  
> Is there any way to do a redelivery with the doTry/doCatch?
>
> Back to the onException problem
> The problem seems to be specific to a spring ws client.  The bean
> 'loaderServiceClient' is a spring ws client and the exceptions do not get
> handled, if I replace the 'to' uri with
> 'spring-ws:http://server.com:8080/service' the exception does not get
> handled either.  If I replace the 'to' uri with a test pojo where the method
> being called explicitly throws an exception, the exceptions are caught and
> handled by the onException.  Is it possible that there is something in the
> Spring WS Client that is eating the exception
>
> Lastly, on the second part of my question from first email, does it seem
> possible that I have multiple consumers grabbing the same message off of the
> queue to load (which is what is causing the exception to be thrown.)  If I
> run with 1 consumer, it runs without exceptions.
>
> -Aaron
> From: Claus Ibsen 
> To: users@camel.apache.org; Aaron Doyle 
> Sent: Monday, October 3, 2011 3:48 AM
> Subject: Re: Exception not getting caught and multiple consumers getting the
> same message
>
> Hi
>
> You need to add true to your
>  to indicate you are handling this exception.
>
>
> On Sun, Oct 2, 2011 at 2:57 PM, Aaron Doyle  wrote:
>> Sorry bout that, hopefully this is better.
>>
>>
>> Message body
>>
>> http://www.springframework.org/schema/beans;
>> xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
>> xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsd
>> http://camel.apache.org/schema/springhttp://camel.apache.org/schema/spring/camel-spring.xsd";;>
>>
>>
>> 
>>     
>>     
>>     
>>     classpath:environment.properties
>>     
>> 
>>
>> http://camel.apache.org/schema/spring";>
>>     
>>     java.lang.Exception
>>     > logStackTrace="true" logRetryAttempted="true">
>>     
>>     
>>
>>     
>>     
>>     
>>     
>

Re: Exception not getting caught and multiple consumers getting the same message

2011-10-04 Thread Claus Ibsen
Could it be the spring-ws client returns a SOAP Fault and not an exception?
Camel error handler only reacts upon exceptions.

There is a flag you can enable on the route, handleFault=true, that
turns SOAP faults into exceptions,
and allow Camel error handler to react then.

On Mon, Oct 3, 2011 at 2:16 PM, Aaron Doyle  wrote:
> Hello,
>
> That did not seem to help fix my problem.  If I change my route to the
> following, the exception is caught and sent to the loadable failure queue.
>
> 
>  
>  
>  
>  
> 
>  
> 
>  
> Is there any way to do a redelivery with the doTry/doCatch?
>
> Back to the onException problem
> The problem seems to be specific to a spring ws client.  The bean
> 'loaderServiceClient' is a spring ws client and the exceptions do not get
> handled, if I replace the 'to' uri with
> 'spring-ws:http://server.com:8080/service' the exception does not get
> handled either.  If I replace the 'to' uri with a test pojo where the method
> being called explicitly throws an exception, the exceptions are caught and
> handled by the onException.  Is it possible that there is something in the
> Spring WS Client that is eating the exception
>
> Lastly, on the second part of my question from first email, does it seem
> possible that I have multiple consumers grabbing the same message off of the
> queue to load (which is what is causing the exception to be thrown.)  If I
> run with 1 consumer, it runs without exceptions.
>
> -Aaron
> From: Claus Ibsen 
> To: users@camel.apache.org; Aaron Doyle 
> Sent: Monday, October 3, 2011 3:48 AM
> Subject: Re: Exception not getting caught and multiple consumers getting the
> same message
>
> Hi
>
> You need to add true to your
>  to indicate you are handling this exception.
>
>
> On Sun, Oct 2, 2011 at 2:57 PM, Aaron Doyle  wrote:
>> Sorry bout that, hopefully this is better.
>>
>>
>> Message body
>>
>> http://www.springframework.org/schema/beans;
>> xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
>> xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsd
>> http://camel.apache.org/schema/springhttp://camel.apache.org/schema/spring/camel-spring.xsd";;>
>>
>>
>> 
>>     
>>     
>>     
>>     classpath:environment.properties
>>     
>> 
>>
>> http://camel.apache.org/schema/spring";>
>>     
>>     java.lang.Exception
>>     > logStackTrace="true" logRetryAttempted="true">
>>     
>>     
>>
>>     
>>     
>>     
>>     
>> 
>>
>> > id="loaderServiceClient"class="com.tms.relay.ws.loader.client.LoaderServiceClient">
>>
>> > lass="org.apache.activemq.ActiveMQConnectionFactory">
>>     
>> 
>>
>> > class="org.apache.activemq.pool.PooledConnectionFactory">
>>     
>>     
>>     
>> 
>>
>> > class="org.apache.camel.component.jms.JmsConfiguration">
>>     >  ref="pooledConnectionFactory">
>>     
>> 
>>
>> >  id="activemq"class="org.apache.activemq.camel.component.ActiveMQComponent">
>>     
>> 
>>
>> 
>>
>>
>> 
>> From: Claus Ibsen 
>> To: users@camel.apache.org
>> Sent: Sunday, October 2, 2011 3:08 AM
>> Subject: Re: Exception not getting caught and multiple consumers getting
>> the same message
>>
>> Hi
>>
>> Can you post the XML so its readable :)
>>
>>
>> On Sat, Oct 1, 2011 at 6:40 PM, Aaron Doyle  wrote:
>>> I have a small route that reads from an activemq queue and sends the
>>> message to a bean, a service client that calls a web service, and am
>>> experiencing a few issues.  The onException configuration doesn't seem to
>>> get called when the bean throws an exception, and it seems like some of my
>>> concurrent consumers are getting the same message off the queue.  The queue
>>> is preloaded with 500 unique messages, the messages are eventually being
>>> loaded to a database, the exception being thrown states that a duplicate key
>>> was being inserted, which could only happen if two consumers picked up the
&

Re: Exception not getting caught and multiple consumers getting the same message

2011-10-03 Thread Aaron Doyle
Hello,
 
That did not seem to help fix my problem.  If I change my route to the 
following, the exception is caught and sent to the loadable failure queue.  
 

 
 
 
 

 

 

Is there any way to do a redelivery with the doTry/doCatch?  
 
Back to the onException problem
The problem seems to be specific to a spring ws client.  The bean 
'loaderServiceClient' is a spring ws client and the exceptions do not get 
handled, if I replace the 'to' uri with 
'spring-ws:http://server.com:8080/service' the exception does not get handled 
either.  If I replace the 'to' uri with a test pojo where the method being 
called explicitly throws an exception, the exceptions are caught and handled by 
the onException.  Is it possible that there is something in the Spring WS 
Client that is eating the exception
 
Lastly, on the second part of my question from first email, does it seem 
possible that I have multiple consumers grabbing the same message off of the 
queue to load (which is what is causing the exception to be thrown.)  If I run 
with 1 consumer, it runs without exceptions.
 
-Aaron



From: Claus Ibsen 
To: users@camel.apache.org; Aaron Doyle 
Sent: Monday, October 3, 2011 3:48 AM
Subject: Re: Exception not getting caught and multiple consumers getting the 
same message

Hi

You need to add true to your
 to indicate you are handling this exception.


On Sun, Oct 2, 2011 at 2:57 PM, Aaron Doyle  wrote:
> Sorry bout that, hopefully this is better.
>
>
> Message body
>
> http://www.springframework.org/schema/beans; 
> xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
> xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsd
>  
> http://camel.apache.org/schema/springhttp://camel.apache.org/schema/spring/camel-spring.xsd";;>
>
> 
>     
>     
>     
>     classpath:environment.properties
>     
> 
>
> http://camel.apache.org/schema/spring";>
>     
>     java.lang.Exception
>      logRetryAttempted="true">
>     
>     
>
>     
>     
>     
>     
> 
>
>  id="loaderServiceClient"class="com.tms.relay.ws.loader.client.LoaderServiceClient">
>
>  lass="org.apache.activemq.ActiveMQConnectionFactory">
>     
> 
>
>  class="org.apache.activemq.pool.PooledConnectionFactory">
>     
>     
>     
> 
>
> 
>         
>         
> 
>
>  id="activemq"class="org.apache.activemq.camel.component.ActiveMQComponent">
>     
> 
>
> 
>
>
> 
> From: Claus Ibsen 
> To: users@camel.apache.org
> Sent: Sunday, October 2, 2011 3:08 AM
> Subject: Re: Exception not getting caught and multiple consumers getting the 
> same message
>
> Hi
>
> Can you post the XML so its readable :)
>
>
> On Sat, Oct 1, 2011 at 6:40 PM, Aaron Doyle  wrote:
>> I have a small route that reads from an activemq queue and sends the message 
>> to a bean, a service client that calls a web service, and am experiencing a 
>> few issues.  The onException configuration doesn't seem to get called when 
>> the bean throws an exception, and it seems like some of my concurrent 
>> consumers are getting the same message off the queue.  The queue is 
>> preloaded with 500 unique messages, the messages are eventually being loaded 
>> to a database, the exception being thrown states that a duplicate key was 
>> being inserted, which could only happen if two consumers picked up the same 
>> message ( I think ). After all 500 messages are processed, I end up with 
>> ~495 in the database and 5 missing (not on the failure queue defined by the 
>> onException.
>>
>> I am using ActiveMQ 5.4.1, Camel 2.8.1, Java 1.6.25, Spring 3.0.5 and Spring 
>> WS 2.0.1.
>>
>> Here is my configuration:
>>
>> *Note: I am able to catch the exception if I explicitly put a doTry and 
>> doCatch around the to endpoint in my route.  Also, everything works and 
>> loads into my db fine if I use 1 or 2 consumers.
>>
>> http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"http://www.springframework.org/schema/beans
>>  http://www.springframework.org/schema/beans/spring-beans.xsd
>> http://camel.apache.org/schema/spring
>>
>
   http://camel.apache.org/schema/sprin

Re: Exception not getting caught and multiple consumers getting the same message

2011-10-03 Thread Claus Ibsen
Hi

You need to add true to your
 to indicate you are handling this exception.


On Sun, Oct 2, 2011 at 2:57 PM, Aaron Doyle  wrote:
> Sorry bout that, hopefully this is better.
>
>
> Message body
>
> http://www.springframework.org/schema/beans; 
> xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
> xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsd
>  
> http://camel.apache.org/schema/springhttp://camel.apache.org/schema/spring/camel-spring.xsd";;>
>
> 
>     
>     
>     
>     classpath:environment.properties
>     
> 
>
> http://camel.apache.org/schema/spring";>
>     
>     java.lang.Exception
>      logRetryAttempted="true">
>     
>     
>
>     
>     
>     
>     
> 
>
>  id="loaderServiceClient"class="com.tms.relay.ws.loader.client.LoaderServiceClient">
>
>  lass="org.apache.activemq.ActiveMQConnectionFactory">
>     
> 
>
>  class="org.apache.activemq.pool.PooledConnectionFactory">
>     
>     
>     
> 
>
> 
>     
>     
> 
>
>  id="activemq"class="org.apache.activemq.camel.component.ActiveMQComponent">
>     
> 
>
> 
>
>
> 
> From: Claus Ibsen 
> To: users@camel.apache.org
> Sent: Sunday, October 2, 2011 3:08 AM
> Subject: Re: Exception not getting caught and multiple consumers getting the 
> same message
>
> Hi
>
> Can you post the XML so its readable :)
>
>
> On Sat, Oct 1, 2011 at 6:40 PM, Aaron Doyle  wrote:
>> I have a small route that reads from an activemq queue and sends the message 
>> to a bean, a service client that calls a web service, and am experiencing a 
>> few issues.  The onException configuration doesn't seem to get called when 
>> the bean throws an exception, and it seems like some of my concurrent 
>> consumers are getting the same message off the queue.  The queue is 
>> preloaded with 500 unique messages, the messages are eventually being loaded 
>> to a database, the exception being thrown states that a duplicate key was 
>> being inserted, which could only happen if two consumers picked up the same 
>> message ( I think ). After all 500 messages are processed, I end up with 
>> ~495 in the database and 5 missing (not on the failure queue defined by the 
>> onException.
>>
>> I am using ActiveMQ 5.4.1, Camel 2.8.1, Java 1.6.25, Spring 3.0.5 and Spring 
>> WS 2.0.1.
>>
>> Here is my configuration:
>>
>> *Note: I am able to catch the exception if I explicitly put a doTry and 
>> doCatch around the to endpoint in my route.  Also, everything works and 
>> loads into my db fine if I use 1 or 2 consumers.
>>
>> http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"http://www.springframework.org/schema/beans
>>  http://www.springframework.org/schema/beans/spring-beans.xsd
>> http://camel.apache.org/schema/spring
>>
>   http://camel.apache.org/schema/spring/camel-spring.xsd"xsi:schemaLocation=";>
>  
>  http://camel.apache.org/schema/spring";>java.lang.Exception> q.pool.PooledConnectionFactory">   classpath:environment.properties
>
>
>
> --
> Claus Ibsen
> -
> FuseSource
> Email: cib...@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/


Re: Exception not getting caught and multiple consumers getting the same message

2011-10-02 Thread Aaron Doyle
Sorry bout that, hopefully this is better.
 
 
Message body
 
http://www.springframework.org/schema/beans; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsd
 
http://camel.apache.org/schema/springhttp://camel.apache.org/schema/spring/camel-spring.xsd";;>


    
    
    
    classpath:environment.properties
    


http://camel.apache.org/schema/spring";>
    
    java.lang.Exception
    
    
    

    
    
    
    





    



    
    
    



    
    



    






From: Claus Ibsen 
To: users@camel.apache.org
Sent: Sunday, October 2, 2011 3:08 AM
Subject: Re: Exception not getting caught and multiple consumers getting the 
same message

Hi

Can you post the XML so its readable :)


On Sat, Oct 1, 2011 at 6:40 PM, Aaron Doyle  wrote:
> I have a small route that reads from an activemq queue and sends the message 
> to a bean, a service client that calls a web service, and am experiencing a 
> few issues.  The onException configuration doesn't seem to get called when 
> the bean throws an exception, and it seems like some of my concurrent 
> consumers are getting the same message off the queue.  The queue is preloaded 
> with 500 unique messages, the messages are eventually being loaded to a 
> database, the exception being thrown states that a duplicate key was being 
> inserted, which could only happen if two consumers picked up the same message 
> ( I think ). After all 500 messages are processed, I end up with ~495 in the 
> database and 5 missing (not on the failure queue defined by the onException.
>
> I am using ActiveMQ 5.4.1, Camel 2.8.1, Java 1.6.25, Spring 3.0.5 and Spring 
> WS 2.0.1.
>
> Here is my configuration:
>
> *Note: I am able to catch the exception if I explicitly put a doTry and 
> doCatch around the to endpoint in my route.  Also, everything works and loads 
> into my db fine if I use 1 or 2 consumers.
>
> http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"http://www.springframework.org/schema/beans
>  http://www.springframework.org/schema/beans/spring-beans.xsd
> http://camel.apache.org/schema/spring
>
  http://camel.apache.org/schema/spring/camel-spring.xsd"xsi:schemaLocation=";> 
 http://camel.apache.org/schema/spring";>java.lang.Exception q.pool.PooledConnectionFactory">   classpath:environment.properties



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Exception not getting caught and multiple consumers getting the same message

2011-10-02 Thread Claus Ibsen
Hi

Can you post the XML so its readable :)


On Sat, Oct 1, 2011 at 6:40 PM, Aaron Doyle  wrote:
> I have a small route that reads from an activemq queue and sends the message 
> to a bean, a service client that calls a web service, and am experiencing a 
> few issues.  The onException configuration doesn't seem to get called when 
> the bean throws an exception, and it seems like some of my concurrent 
> consumers are getting the same message off the queue.  The queue is preloaded 
> with 500 unique messages, the messages are eventually being loaded to a 
> database, the exception being thrown states that a duplicate key was being 
> inserted, which could only happen if two consumers picked up the same message 
> ( I think ). After all 500 messages are processed, I end up with ~495 in the 
> database and 5 missing (not on the failure queue defined by the onException.
>
> I am using ActiveMQ 5.4.1, Camel 2.8.1, Java 1.6.25, Spring 3.0.5 and Spring 
> WS 2.0.1.
>
> Here is my configuration:
>
> *Note: I am able to catch the exception if I explicitly put a doTry and 
> doCatch around the to endpoint in my route.  Also, everything works and loads 
> into my db fine if I use 1 or 2 consumers.
>
> http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"http://www.springframework.org/schema/beans
>  http://www.springframework.org/schema/beans/spring-beans.xsd
> http://camel.apache.org/schema/spring
>  http://camel.apache.org/schema/spring/camel-spring.xsd"xsi:schemaLocation=";> 
>  http://camel.apache.org/schema/spring";>java.lang.Exception q.pool.PooledConnectionFactory">   classpath:environment.properties



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/


Exception not getting caught and multiple consumers getting the same message

2011-10-01 Thread Aaron Doyle
I have a small route that reads from an activemq queue and sends the message to 
a bean, a service client that calls a web service, and am experiencing a few 
issues.  The onException configuration doesn't seem to get called when the bean 
throws an exception, and it seems like some of my concurrent consumers are 
getting the same message off the queue.  The queue is preloaded with 500 unique 
messages, the messages are eventually being loaded to a database, the exception 
being thrown states that a duplicate key was being inserted, which could only 
happen if two consumers picked up the same message ( I think ). After all 500 
messages are processed, I end up with ~495 in the database and 5 missing (not 
on the failure queue defined by the onException.

I am using ActiveMQ 5.4.1, Camel 2.8.1, Java 1.6.25, Spring 3.0.5 and Spring WS 
2.0.1.

Here is my configuration: 

*Note: I am able to catch the exception if I explicitly put a doTry and doCatch 
around the to endpoint in my route.  Also, everything works and loads into my 
db fine if I use 1 or 2 consumers.

http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
 http://camel.apache.org/schema/spring/camel-spring.xsd"xsi:schemaLocation=";> 
 http://camel.apache.org/schema/spring";>java.lang.Exception   classpath:environment.properties