Yes,
I saw the Splitter problem too.
While looping the split, camel processes the next processor definition into the
loop so the SendProcessor it's executed for each message while it's splitting.
We've solved that using an external splitting queue to send the message be
splitten and then go to destination queue via setting a header.
That performs the commit when big message is sended to the splitter queue and
when individual messages are coming back to destination queue can find their
data ok in database.
SplitterQueue:
from("non-xa://SplitterQueue?maxConcurrentConsumers=10")
.split(body())
.recipientList(header(IConstants.HEADER_DEFAULT_SPLITTER_DESTINATION));
An example sending to SplitterQueue:
from("non-xa://DoInsertsAndALotOfMessagesQueue?maxConcurrentConsumers=1")
.policy(getPropagationPolicy())
.process(new DoInsertAndPopulateMessage())
.setHeader(HEADER_DEFAULT_SPLITTER_DESTINATION,
constant("non-xa://MyAfterSplitterQueue"))
.to("non-xa://"+QueueNames.QUEUE_SPLITTER_DEFAULT);
That two steps instead of:
from("non-xa://DoInsertsAndALotOfMessagesQueue?maxConcurrentConsumers=1")
.policy(getPropagationPolicy())
.process(new DoInsertAndPopulateMessage())
.split(body())
.to("non-xa://MyAfterSplitterQueue");
Regards.
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo,
contiene información de carácter confidencial exclusivamente dirigida a su
destinatario o destinatarios. Si no es vd. el destinatario indicado, queda
notificado que la lectura, utilización, divulgación y/o copia sin autorización
está prohibida en virtud de la legislación vigente. En el caso de haber
recibido este correo electrónico por error, se ruega notificar inmediatamente
esta circunstancia mediante reenvío a la dirección electrónica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.
This email and any file attached to it (when applicable) contain(s)
confidential information that is exclusively addressed to its recipient(s). If
you are not the indicated recipient, you are informed that reading, using,
disseminating and/or copying it without authorisation is forbidden in
accordance with the legislation in effect. If you have received this email by
mistake, please immediately notify the sender of the situation by resending it
to their email address.
Avoid printing this message if it is not absolutely necessary.
--
View this message in context:
http://camel.465427.n5.nabble.com/Transaction-behaviour-after-ToDefinition-tp4909694p4910967.html
Sent from the Camel - Users mailing list archive at Nabble.com.