Hi,

If a transacted route use delayer, then the process stops (it seems that the
transaction is not committed ...  and that the message stays in the queue )
in the step generating the file.

Here is the syntax of the route :

        <camel:route errorHandlerRef="txErrorHandlerReqNew"
delayer="120000">

            <camel:from ref="queueReportingEndpoint"/>
            <camel:transacted ref="PROPAGATION_REQUIRED_NEW" />
            <camel:choice>
                <camel:when>
                    <camel:simple>${body} != null</camel:simple>
                    <camel:doTry>
                        <camel:marshal ref="csvAuditBindyDataFormat" />
                        <camel:to ref="fileReportingEndpoint" /> // ROUTE
STOPS HERE
                        <camel:doCatch>

<camel:exception>java.lang.Exception</camel:exception>
                            <camel:to
uri="log:com.xpectis.x3s?level=INFO&amp;multiline=true&amp;showException=true&amp;showCaughtException=true&amp;showStackTrace=true"
/>
                            <camel:rollback />
                        </camel:doCatch>
                    </camel:doTry>
                </camel:when>
            </camel:choice>
        </camel:route>

Here is the stack trace of the route when the delayer is not used :

16:32:59,651 | INFO  | tenerContainer-1 | TraceInterceptor                 |
rg.apache.camel.processor.Logger   88 |
ID:dell-charles-1840-1251124287338-3:8:1:1:1 >>>
from(queuingservice://x3s:reporting) --> ref:PROPAGATION_REQUIRED_NEW,
Pattern:InOnly, Headers:{JMSXGroupID=null, JMSReplyTo=null,
CamelFileRelativePath=d:\temp\data\oinp\OINP_Example.csv, JMSPriority=4,
CamelBeanMultiParameterArray=false, CamelFileNameOnly=OINP_Example.csv,
CamelFileLength=892, CamelFileAbsolute=true, JMSRedelivered=false,
CamelFileParent=d:\temp\data\oinp, CamelFileLastModified=Mon Jul 27 16:33:12
CEST 2009, JMSTimestamp=1251124379479, JMSDestination=queue://x3s:reporting,
JMSExpiration=0, CamelFilePath=d:\temp\data\oinp\OINP_Example.csv,
CamelFileName=OINP_Example.csv, JMSDeliveryMode=2, JMSCorrelationID=null,
JMSType=null, CamelFileAbsolutePath=d:\temp\data\oinp\OINP_Example.csv,
origin=file, messageType=OINP,
JMSMessageID=ID:dell-charles-1840-1251124287338-3:8:1:1:1},
BodyType:java.util.ArrayList,
Body:[{com.xpectis.x3s.model.backoffice.audit.in.inaudit=com.xpectis.x3s.model.backoffice.audit.in.inau...@a0ee3f
}]
16:32:59,651 | INFO  | tenerContainer-1 | TraceInterceptor                 |
rg.apache.camel.processor.Logger   88 |
ID:dell-charles-1840-1251124287338-3:8:1:1:1 >>>
ref:PROPAGATION_REQUIRED_NEW --> Choice, Pattern:InOnly,
Headers:{JMSXGroupID=null, JMSReplyTo=null,
CamelFileRelativePath=d:\temp\data\oinp\OINP_Example.csv, JMSPriority=4,
CamelBeanMultiParameterArray=false, CamelFileNameOnly=OINP_Example.csv,
CamelFileLength=892, CamelFileAbsolute=true, JMSRedelivered=false,
CamelFileParent=d:\temp\data\oinp, CamelFileLastModified=Mon Jul 27 16:33:12
CEST 2009, JMSTimestamp=1251124379479, JMSDestination=queue://x3s:reporting,
JMSExpiration=0, CamelFilePath=d:\temp\data\oinp\OINP_Example.csv,
CamelFileName=OINP_Example.csv, JMSDeliveryMode=2, JMSCorrelationID=null,
JMSType=null, CamelFileAbsolutePath=d:\temp\data\oinp\OINP_Example.csv,
origin=file, messageType=OINP,
JMSMessageID=ID:dell-charles-1840-1251124287338-3:8:1:1:1},
BodyType:java.util.ArrayList,
Body:[{com.xpectis.x3s.model.backoffice.audit.in.inaudit=com.xpectis.x3s.model.backoffice.audit.in.inau...@a0ee3f
}]
16:32:59,682 | INFO  | tenerContainer-1 | TraceInterceptor                 |
rg.apache.camel.processor.Logger   88 |
ID:dell-charles-1840-1251124287338-3:8:1:1:1 >>> Choice --> Try,
Pattern:InOnly, Headers:{JMSXGroupID=null, JMSReplyTo=null,
CamelFileRelativePath=d:\temp\data\oinp\OINP_Example.csv, JMSPriority=4,
CamelBeanMultiParameterArray=false, CamelFileNameOnly=OINP_Example.csv,
CamelFileLength=892, CamelFileAbsolute=true, JMSRedelivered=false,
CamelFileParent=d:\temp\data\oinp, CamelFileLastModified=Mon Jul 27 16:33:12
CEST 2009, JMSTimestamp=1251124379479, JMSDestination=queue://x3s:reporting,
JMSExpiration=0, CamelFilePath=d:\temp\data\oinp\OINP_Example.csv,
CamelFileName=OINP_Example.csv, JMSDeliveryMode=2, JMSCorrelationID=null,
JMSType=null, CamelFileAbsolutePath=d:\temp\data\oinp\OINP_Example.csv,
origin=file, messageType=OINP,
JMSMessageID=ID:dell-charles-1840-1251124287338-3:8:1:1:1},
BodyType:java.util.ArrayList,
Body:[{com.xpectis.x3s.model.backoffice.audit.in.inaudit=com.xpectis.x3s.model.backoffice.audit.in.inau...@a0ee3f
}]
16:32:59,698 | INFO  | tenerContainer-1 | TraceInterceptor                 |
rg.apache.camel.processor.Logger   88 |
ID:dell-charles-1840-1251124287338-3:8:1:1:1 >>> Try -->, Pattern:InOnly,
Headers:{JMSXGroupID=null, JMSReplyTo=null,
CamelFileRelativePath=d:\temp\data\oinp\OINP_Example.csv, JMSPriority=4,
CamelBeanMultiParameterArray=false, CamelFileNameOnly=OINP_Example.csv,
CamelFileLength=892, CamelFileAbsolute=true, JMSRedelivered=false,
CamelFileParent=d:\temp\data\oinp, CamelFileLastModified=Mon Jul 27 16:33:12
CEST 2009, JMSTimestamp=1251124379479, JMSDestination=queue://x3s:reporting,
JMSExpiration=0, CamelFilePath=d:\temp\data\oinp\OINP_Example.csv,
CamelFileName=OINP_Example.csv, JMSDeliveryMode=2, JMSCorrelationID=null,
JMSType=null, CamelFileAbsolutePath=d:\temp\data\oinp\OINP_Example.csv,
origin=file, messageType=OINP,
JMSMessageID=ID:dell-charles-1840-1251124287338-3:8:1:1:1},
BodyType:java.util.ArrayList,
Body:[{com.xpectis.x3s.model.backoffice.audit.in.inaudit=com.xpectis.x3s.model.backoffice.audit.in.inau...@a0ee3f
}]
16:33:00,151 | INFO  | tenerContainer-1 | TraceInterceptor                 |
rg.apache.camel.processor.Logger   88 |
ID:dell-charles-1840-1251124287338-3:8:1:1:1 >>>  -->
file://d:/temp/data/reporting?fileName=%2F%24%7Bdate%3Anow%3AyyyyMMdd%7D%2F%24%7Bdate%3Anow%3Ahhmmss%7D.txt,
Pattern:InOnly,
Headers:{JMSMessageID=ID:dell-charles-1840-1251124287338-3:8:1:1:1,
JMSReplyTo=null, CamelFileName=OINP_Example.csv, JMSTimestamp=1251124379479,
JMSCorrelationID=null, CamelFileParent=d:\temp\data\oinp, JMSPriority=4,
CamelFileNameOnly=OINP_Example.csv, JMSDestination=queue://x3s:reporting,
origin=file, JMSExpiration=0,
CamelFileAbsolutePath=d:\temp\data\oinp\OINP_Example.csv, JMSDeliveryMode=2,
CamelFileLength=892, CamelBeanMultiParameterArray=false,
JMSRedelivered=false, JMSXGroupID=null, JMSType=null,
CamelFileRelativePath=d:\temp\data\oinp\OINP_Example.csv, messageType=OINP,
CamelFileAbsolute=true, CamelFilePath=d:\temp\data\oinp\OINP_Example.csv,
CamelFileLastModified=Mon Jul 27 16:33:12 CEST 2009}, BodyType:byte[],
Body:E9998,Unknown error,ERR,20093224-04:32:59,null,null,null

But when DELAYER is enable in the route, the transaction is not commited :

16:46:37,073 | INFO  | tenerContainer-1 | TraceInterceptor                 |
rg.apache.camel.processor.Logger   88 |
ID:dell-charles-1840-1251124287338-3:17:1:1:1 >>> Choice --> Try,
Pattern:InOnly, Headers:{CamelFileNameOnly=OINP_Example.csv,
JMSDestination=queue://x3s:reporting,
CamelFileAbsolutePath=d:\temp\data\oinp\OINP_Example.csv,
CamelFileName=OINP_Example.csv, origin=file, JMSPriority=4,
JMSXGroupID=null, JMSReplyTo=null,
CamelFileRelativePath=d:\temp\data\oinp\OINP_Example.csv,
CamelBeanMultiParameterArray=false, JMSRedelivered=false, JMSDeliveryMode=2,
JMSMessageID=ID:dell-charles-1840-1251124287338-3:17:1:1:1,
CamelFileParent=d:\temp\data\oinp, JMSType=null, JMSExpiration=0,
CamelFileLength=892, CamelFileLastModified=Mon Jul 27 16:33:12 CEST 2009,
CamelFileAbsolute=true, JMSCorrelationID=null, messageType=OINP,
CamelFilePath=d:\temp\data\oinp\OINP_Example.csv,
JMSTimestamp=1251124681885}, BodyType:java.util.ArrayList,
Body:[{com.xpectis.x3s.model.backoffice.audit.in.inaudit=com.xpectis.x3s.model.backoffice.audit.in.inau...@13e6f3
}]

Every 2 minutes, the delayer tries to reprocess the message without success

Regards,


Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com

Reply via email to