Hi Mega
I suspect this has something to do with the transaction timeout. Each message is received in a transaction and SQL server holds a lock on message record during the transaction so no one else can pick the message. But the transaction can time out and then SQL server will roll it back and release the lock on the message, allowing other thread to handle it again.
Transaction timeout is configured with
MessageBusConfigurator.SetReceiveTransactionTimeout
and by default it's set to 1 minute
I don't know your code and have no idea why stored procedure you mentioned appears to keep going even after the message transaction timed out, maybe it's not a part of same transaction or executes some non-transactional operations - please give more details in next posts, if the problem remains unsolved.
Now you could increase the transaction timeout to say 20 minutes and hope this is enough, but I'm not sure if this is the right solution (usually a transaction should complete in couple of seconds). But please try doing that and see what happens. The alternative way of solving that would be to handle the long-running work in a separate transaction, and only initiate it with a message on message bus (+ monitoring the status/completion and retrying in case the operation is interrupted in the middle).
Best regards
Rafal