Sanne Grinovero: I can reproduce the timeout exception now (still a bit ad-hoc-ish, but it could be automated), but something made me curious which I'd like to discuss with you.
I'm running with one producer and one consumer (performing several "takes" from the queue), and I meant to set it up in a way that the timeout exception only would occur on the producer side. But actually the transactions on both sides time out: on the producer side (as intended) and on the consumer side.
The latter is caused by the fact that the consumer (IdentifierConsumerDocumentProducer) runs all its takes in one single transaction. I would have it expected to use one transaction per take. Is this actually intended? Depending on the data size, that may be a very long running transaction (btw. we also never do a session clearance), so using one TX per reasonably-sized object batch (say 100 or 1000 items) seems more reasonable IMO. That'd be one step towards avoiding the timeout exceptions (as users can control this through the batch size), so we'd only have to deal with the exception on the producer side. WDYT?
Either way, with the current set-up I cannot enforce a timeout exception only on the consumer side, it will always be producer and consumer side.
|