Hi
I think disabling the lock-files would just be treating the symptoms and not
the real cause.
The AggregationStrategy:
public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
if (oldExchange == null) {
Map<String, byte[]> messageMap = new HashMap<String, byte[]>();
if (!"empty".equals(newExchange.getIn().getBody(String.class)))
messageMap.put(newExchange.getIn().getHeader("CamelFileNameOnly",
String.class), newExchange.getIn().getBody(byte[].class));
newExchange.getIn().setBody(messageMap);
return newExchange;
}
Map<String, byte[]> messageMap = oldExchange.getIn().getBody(Map.class);
if (!"empty".equals(newExchange.getIn().getBody(String.class)))
messageMap.put(newExchange.getIn().getHeader("CamelFileNameOnly",
String.class), newExchange.getIn().getBody(byte[].class));
oldExchange.getIn().setBody(messageMap);
return oldExchange;
}
The route where it is used:
<route id="AggregateInMsgAndControlQueue">
<from uri="seda:AggregateInMsgAndControlQueue" />
<aggregate completionSize="2" strategyRef="InMsgAndControlAggregator">
<correlationExpression>
<header>envelopeId</header>
</correlationExpression>
<to uri="ZipMessageListProcessor" />
<to
uri="file:{{directory.incoming.backup}}?fileName={{edifact.messagePrefix}}${header.envelopeId}.zip"
/>
</aggregate>
</route>
--
View this message in context:
http://camel.465427.n5.nabble.com/Processed-file-being-read-again-and-is-empty-tp3256771p3258288.html
Sent from the Camel - Users mailing list archive at Nabble.com.