Re: Redelivery Policy set on Camel is ignored

2015-11-09 Thread Michele
Hi Claus,

i cleaned my test-project and i re-configured it in this way and it seems
work fine :):
Redelivery policy is respected and after 3 attempts message is moved in
ActiveMQ.DLQ.




































Thank you very much for your tips. 

Best regards

Michele



--
View this message in context: 
http://camel.465427.n5.nabble.com/Redelivery-Policy-set-on-Camel-is-ignored-tp5773409p5773536.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Redelivery Policy set on Camel is ignored

2015-11-09 Thread Michele
Hi Claus,

I tried to set redelivery policy on the ActiveMQ Broker as you suggested and
i modified my configuration as:


jms.redeliveryPolicy.maximumRedeliveries=3jms.redeliveryPolicy.redeliveryDelay=6jms.redeliveryPolicy.initialRedeliveryDelay=0*"
/>





and i also tried to set it by setting redelivery policy property defined as


 

 


but the policy is ignored, redeliveries are immediate.

I am a bit 'confused. 

Sorry.

Thanks in advance.

Kind greeting

Michele






--
View this message in context: 
http://camel.465427.n5.nabble.com/Redelivery-Policy-set-on-Camel-is-ignored-tp5773409p5773525.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Redelivery Policy set on Camel is ignored

2015-11-06 Thread Michele
Hi Claus,

first of all thank you very much:).

I read and followed the link that you suggested and i changed the
configuration as you can see below:









**
   


But the result is the same. Redelivery Policy is ignored.
I need to configure a DMLC for caching messages to re-delivery?

Thanks in advance.

Greeting
Michele
  



--
View this message in context: 
http://camel.465427.n5.nabble.com/Redelivery-Policy-set-on-Camel-is-ignored-tp5773409p5773433.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Redelivery Policy set on Camel is ignored

2015-11-06 Thread Claus Ibsen
Hi

Ah you need to set the redelivery on the ActiveMQ brokerUrl as its
baked into AMQ redelivery.
I was quick reading the mails on this user forum and didnt spot your
code was the Camel AMQ redelivery class.

As you want to use TX and rollback on failure and let the AMQ broker
redeliver the message.

The Camel redelivery policy is when Camel is orchestrating the
redelivery, which is not the case when you want to use JMS TX.

There is an example here
https://github.com/camelinaction/camelinaction2/blob/master/chapter12/riderautoparts-partner/src/test/resources/camelinaction/RiderAutoPartsPartnerTransactedTest.xml

Though it uses the default redelivery options from AMQ. You can
configure those in the brokerUrl, see bottom of this page
http://activemq.apache.org/connection-configuration-uri.html

And to make confusion even bigger, then there is a AMQ broker
redelivery functionality also but its using the AMQ scheduler which is
not supported in all AMQ datastores. Both kinds have their pros/cons.





On Fri, Nov 6, 2015 at 11:35 AM, Michele
<michele.mazzi...@finconsgroup.com> wrote:
> Hi Claus,
>
> first of all thank you very much:).
>
> I read and followed the link that you suggested and i changed the
> configuration as you can see below:
>
>  class="org.apache.camel.component.jms.JmsConfiguration">
>  ref="pooledConnectionFactory" />
>  ref="jmsTransactionManager" />
> 
> 
>
> 
> 
> **
> 
> 
> But the result is the same. Redelivery Policy is ignored.
> I need to configure a DMLC for caching messages to re-delivery?
>
> Thanks in advance.
>
> Greeting
> Michele
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Redelivery-Policy-set-on-Camel-is-ignored-tp5773409p5773433.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Redelivery Policy set on Camel is ignored

2015-11-05 Thread Michele
Hi,

I'm enabling transaction in JMS Queue consuming route, and trying to
configure RedeliveryPolicy in Spring/Camel file as you can see below:


 
 
 
  
  
  

 
  http://camel.apache.org/schema/spring;>
  
  
  
  
 
  
  
  
  
  

 
  
  
 
I invoke rollback to check if messages are redelivered to a client.
But redelivery policy configuration is ignored because all redeliveries are
immediate (Underline log warn)

*First attempt*
*12:37:23,471 | WARN  | incomingTickets] | TransactionErrorHandler* 
| 198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Transaction
rollback (0x64f41c09) redelivered(false) for (MessageId:
ID:FGBAL201530-51469-1446720227638-11:4:3:1:1 on ExchangeId:
ID-FGBAL201530-51470-1446720230674-5-3) caught:
org.apache.camel.RollbackExchangeException: Intended rollback.
Exchange[JmsMessage[JmsMessageID:
ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]
12:37:23,471 | WARN  | incomingTickets] | EndpointMessageListener  |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Execution of JMS
message listener failed. Caused by: [org.apache.camel.RuntimeCamelException
- org.apache.camel.RollbackExchangeException: Intended rollback.
Exchange[JmsMessage[JmsMessageID:
ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]]
12:37:23,511 | INFO  | incomingTickets] | normalize-message-data   |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Received: Azienda
7 by Rest API,examp...@example.com
12:37:23,521 | WARN  | incomingTickets] | TransactionErrorHandler  |
203 - org.apache.camel.camel-spring - 2.15.1.redhat-620133 | Rollback
(MessageId: ID:FGBAL201530-51469-1446720227638-11:4:3:1:1 on ExchangeId:
ID-FGBAL201530-51470-1446720230674-5-4) due: Intended rollback.
Exchange[JmsMessage[JmsMessageID:
ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]
12:37:23,521 | WARN  | incomingTickets] | TransactionErrorHandler  |
203 - org.apache.camel.camel-spring - 2.15.1.redhat-620133 | Rollback
(MessageId: ID:FGBAL201530-51469-1446720227638-11:4:3:1:1 on ExchangeId:
ID-FGBAL201530-51470-1446720230674-5-4) due: Intended rollback.
Exchange[JmsMessage[JmsMessageID:
ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]

*Second attempt*
*12:37:23,521 | WARN  | incomingTickets] | TransactionErrorHandler* 
| 198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Transaction
rollback (0x64f41c09) redelivered(true) for (MessageId:
ID:FGBAL201530-51469-1446720227638-11:4:3:1:1 on ExchangeId:
ID-FGBAL201530-51470-1446720230674-5-4) caught:
org.apache.camel.RollbackExchangeException: Intended rollback.
Exchange[JmsMessage[JmsMessageID:
ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]
12:37:23,521 | WARN  | incomingTickets] | EndpointMessageListener  |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Execution of JMS
message listener failed. Caused by: [org.apache.camel.RuntimeCamelException
- org.apache.camel.RollbackExchangeException: Intended rollback.
Exchange[JmsMessage[JmsMessageID:
ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]]
12:37:23,581 | INFO  | incomingTickets] | normalize-message-data   |
198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Received: Azienda
7 by Rest API,examp...@example.com
12:37:23,581 | WARN  | incomingTickets] | TransactionErrorHandler  |
203 - org.apache.camel.camel-spring - 2.15.1.redhat-620133 | Rollback
(MessageId: ID:FGBAL201530-51469-1446720227638-11:4:3:1:1 on ExchangeId:
ID-FGBAL201530-51470-1446720230674-5-5) due: Intended rollback.
Exchange[JmsMessage[JmsMessageID:
ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]
12:37:23,581 | WARN  | incomingTickets] | TransactionErrorHandler  |
203 - org.apache.camel.camel-spring - 2.15.1.redhat-620133 | Rollback
(MessageId: ID:FGBAL201530-51469-1446720227638-11:4:3:1:1 on ExchangeId:
ID-FGBAL201530-51470-1446720230674-5-5) due: Intended rollback.
Exchange[JmsMessage[JmsMessageID:
ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]
 
and so on.
What do I do to achieve a redelivery with interval of one minute and max
redeliveries 3? I wrong a configuration?
 
Environment:
JBoss Fuse 6.2 on Java 1.8
 
Thank you in advance
 
Regards
Michele



--
View this message in context: 
http://camel.465427.n5.nabble.com/Redelivery-Policy-set-on-Camel-is-ignored-tp5773409.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Redelivery Policy set on Camel is ignored

2015-11-05 Thread Claus Ibsen
Are you using cache consumer on the jms component.

You would need that as the redelivery delay is tracked on the client
side, and it needs to cache the consumer so its the same consumer
doing the redelivery.

See the cache level option at
http://camel.apache.org/jms

On Fri, Nov 6, 2015 at 7:47 AM, Michele
<michele.mazzi...@finconsgroup.com> wrote:
> Hi,
>
> I'm enabling transaction in JMS Queue consuming route, and trying to
> configure RedeliveryPolicy in Spring/Camel file as you can see below:
>
>  class="org.apache.camel.processor.RedeliveryPolicy">
>  
>  
>  
>   
>class="org.apache.camel.spring.spi.TransactionErrorHandlerBuilder">
>   
> 
>
>xmlns="http://camel.apache.org/schema/spring;>
>   
>   
>   
>   
>
>   
>   
>   
>   
>   
>
>  
>   
>   
>
> I invoke rollback to check if messages are redelivered to a client.
> But redelivery policy configuration is ignored because all redeliveries are
> immediate (Underline log warn)
>
> *First attempt*
> *12:37:23,471 | WARN  | incomingTickets] | TransactionErrorHandler*
> | 198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Transaction
> rollback (0x64f41c09) redelivered(false) for (MessageId:
> ID:FGBAL201530-51469-1446720227638-11:4:3:1:1 on ExchangeId:
> ID-FGBAL201530-51470-1446720230674-5-3) caught:
> org.apache.camel.RollbackExchangeException: Intended rollback.
> Exchange[JmsMessage[JmsMessageID:
> ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]
> 12:37:23,471 | WARN  | incomingTickets] | EndpointMessageListener  |
> 198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Execution of JMS
> message listener failed. Caused by: [org.apache.camel.RuntimeCamelException
> - org.apache.camel.RollbackExchangeException: Intended rollback.
> Exchange[JmsMessage[JmsMessageID:
> ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]]
> 12:37:23,511 | INFO  | incomingTickets] | normalize-message-data   |
> 198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Received: Azienda
> 7 by Rest API,examp...@example.com
> 12:37:23,521 | WARN  | incomingTickets] | TransactionErrorHandler  |
> 203 - org.apache.camel.camel-spring - 2.15.1.redhat-620133 | Rollback
> (MessageId: ID:FGBAL201530-51469-1446720227638-11:4:3:1:1 on ExchangeId:
> ID-FGBAL201530-51470-1446720230674-5-4) due: Intended rollback.
> Exchange[JmsMessage[JmsMessageID:
> ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]
> 12:37:23,521 | WARN  | incomingTickets] | TransactionErrorHandler  |
> 203 - org.apache.camel.camel-spring - 2.15.1.redhat-620133 | Rollback
> (MessageId: ID:FGBAL201530-51469-1446720227638-11:4:3:1:1 on ExchangeId:
> ID-FGBAL201530-51470-1446720230674-5-4) due: Intended rollback.
> Exchange[JmsMessage[JmsMessageID:
> ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]
>
> *Second attempt*
> *12:37:23,521 | WARN  | incomingTickets] | TransactionErrorHandler*
> | 198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Transaction
> rollback (0x64f41c09) redelivered(true) for (MessageId:
> ID:FGBAL201530-51469-1446720227638-11:4:3:1:1 on ExchangeId:
> ID-FGBAL201530-51470-1446720230674-5-4) caught:
> org.apache.camel.RollbackExchangeException: Intended rollback.
> Exchange[JmsMessage[JmsMessageID:
> ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]
> 12:37:23,521 | WARN  | incomingTickets] | EndpointMessageListener  |
> 198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Execution of JMS
> message listener failed. Caused by: [org.apache.camel.RuntimeCamelException
> - org.apache.camel.RollbackExchangeException: Intended rollback.
> Exchange[JmsMessage[JmsMessageID:
> ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]]
> 12:37:23,581 | INFO  | incomingTickets] | normalize-message-data   |
> 198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Received: Azienda
> 7 by Rest API,examp...@example.com
> 12:37:23,581 | WARN  | incomingTickets] | TransactionErrorHandler  |
> 203 - org.apache.camel.camel-spring - 2.15.1.redhat-620133 | Rollback
> (MessageId: ID:FGBAL201530-51469-1446720227638-11:4:3:1:1 on ExchangeId:
> ID-FGBAL201530-51470-1446720230674-5-5) due: Intended rollback.
> Exchange[JmsMessage[JmsMessageID:
> ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]
> 12:37:23,581 | WARN  | incomingTickets] | TransactionErrorHandler  |
> 203 - org.apache.camel.camel-spring - 2.15.1.redhat-620133 | Rollback
> (MessageId: ID:FGBAL201530-51469-1446720227638-11:4:3:1:1 on ExchangeId:
> ID-FGBAL201530-51470-1446720230674-5-5) due: Intended rollback.
> Exchange[JmsMessage[JmsMessageID:
> ID:FGBAL201530-51469-1446720227638-11:4:3:1:1]]
>
> and so on.
> What d