In my system LockDuration = 5 minutes, AutoRenewTimeout = 20 minutes. Processing of some messages taking more then 5 minutes (sometime 5:15, sometimes more then 6:00). For these messages I have an exception:
"The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue."
I read in our logs, that system started processing a message (lets call it Process_A), it was still in progress when, after 5 minutes, system start processing the same message one more time (lets call it Process_B). Process_A finished and called Complete(). Then Process_B did the work and called Complete(). And it causes exception because this message is already complited.
I found in documentation that maximum value of LockDuration is 5 minutes. Why? Messages lasting more than 5 minutes can't be processed? Or mayby the configuration is wrong?