You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by piotrsl <p....@gmail.com> on 2013/07/29 18:21:06 UTC

Aggregator message redelivery issues

Hi Guys 
I'm struggling with the following issue and maybe you will be able to help
me.

Recently i have noticed that messages which are aggregated by camel
Aggregator2 with hawtdb persistence store are lost because the following
exception

2013-07-29 10:02:18,478 | ERROR | Failed delivery for exchangeId:
ID-UK1DAAMQ001VA-57144-1374756544748-0-9284. Exhausted after delivery
attempt: 1 caught: java.lang.RuntimeException: Error getting key 125AAA from
repository futuresAggregatorRepository |
org.apache.camel.processor.DefaultErrorHandler | Camel (camel) thread #11 -
JmsConsumer[GC.Canonical.ClearedTrade.Tempest.Test]
java.lang.RuntimeException: Error getting key 125AAA  from repository
AggregatorRepository
	at
org.apache.camel.component.hawtdb.HawtDBAggregationRepository.get(HawtDBAggregationRepository.java:164)
.....
Caused by: java.io.IOException
	at java.nio.MappedByteBuffer.force0(Native Method)
	at java.nio.MappedByteBuffer.force(MappedByteBuffer.java:154)
	at
org.fusesource.hawtdb.internal.io.MemoryMappedFile.sync(MemoryMappedFile.java:255)
	at
org.fusesource.hawtdb.internal.page.HawtTxPageFile.syncBatches(HawtTxPageFile.java:656)
	at
org.fusesource.hawtdb.internal.page.HawtTxPageFile.flush(HawtTxPageFile.java:551)
	at
org.apache.camel.component.hawtdb.HawtDBFile.doExecute(HawtDBFile.java:165)
	at
org.apache.camel.component.hawtdb.HawtDBFile.execute(HawtDBFile.java:113)
	at
org.apache.camel.component.hawtdb.HawtDBAggregationRepository.get(HawtDBAggregationRepository.java:144)

------------------------------------------------------------------------------------------------------
CAMEL

<bean id="AggregatorRepository"
class="org.apache.camel.component.hawtdb.HawtDBAggregationRepository">
		<property name="repositoryName" value="AggregatorRepository"/>
		<property name="persistentFileName"
value="\\max\apps\AggregatorRepository\DEV\AggregatorRepository.dat"/>		
		<property name="useRecovery" value="true"/>
		<property name="recoveryInterval" value="60000"/>
		<property name="maximumRedeliveries" value="240"/>
		<property name="deadLetterUri" value="jms:queue:DLQ.GC.Aggregator.Dev"/>		
</bean>

----------------------------------------------------------------------------------------------------


Do you know what might be causing java.io.IOException
And why redelivery mechanism didn't work


Details
apache-activemq-5.5.1-fuse-03-06
hawtdb-1.6.jar
hawtbuf-1.9.jar
camel-hawtdb-2.8.6.jar





--
View this message in context: http://camel.465427.n5.nabble.com/Aggregator-message-redelivery-issues-tp5736445.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Aggregator message redelivery issues

Posted by piotrsl <p....@gmail.com>.
I've digged little bit more and found possible cause of my problem.
I try to simulate unavailability of HawtDBAggregationRepository
persistentFile by killing session which was established by one of MQ node to
the share location. After than i found in mq logs the following entry which
was repeated many times:

------------------------------------------------------
2013-08-01 16:27:46,794 | WARN  | Exception occurred during purge task. This
exception will be ignored. |
org.apache.camel.processor.aggregate.AggregateProcessor$AggregationTimeoutMap
| Camel (camel) thread #3 - AggregateTimeoutChecker
java.lang.RuntimeException: Error getting key 222AAA from repository
futuresAggregatorRepository
----------------------------------------------------------

It seems that this entry is loged almost like in infinite loop till activemq
service is restarted.
Moreover I've notice that session to the file location is not re established
till activemq service is restarted.

Do you have any suggestions how to handle this IO.Exception and configure
activemq to reestablish connection. 
I have tried to use default error handler in route with defined redelivery
policy but is seems that is doesn't work

 



--
View this message in context: http://camel.465427.n5.nabble.com/Aggregator-message-redelivery-issues-tp5736445p5736693.html
Sent from the Camel - Users mailing list archive at Nabble.com.