Closed qsdfplkj closed 3 years ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @axisc.
Author: | qsdfplkj |
---|---|
Assignees: | - |
Labels: | `Client`, `Service Attention`, `Service Bus`, `customer-reported`, `needs-team-attention`, `needs-triage`, `question` |
Milestone: | - |
The issue only seems to occur on queue that have sessions enabled.
@qsdfplkj This happens when the session lock is expired and needs to be reacquired.
If the issue persists after renewing the message lock, please consider opening a support ticket through the Azure Portal so that we can investigate the backend.
@axisc The issue is 100% reproducible with the repro I provided but we will be using sessionless queue. Why should I report it elsewhere? If you look at the stacktrace that is logged with the message you will notice that the underlying problem is that the code assumes it needs to complete it again.
but we will be using sessionless queue.
Not sure what you mean? can you elaborate?
If you look at the stacktrace that is logged with the message you will notice that the underlying problem is that the code assumes it needs to complete it again.
The issue here is that the lock is volatile and by the time your application attempts to complete the session, the lock is lost.
Closing this due to inactivity. Please feel free to reopen with details.
but we will be using sessionless queue.
Not sure what you mean? can you elaborate?
the issue only appears on session enabled queues but for me there is no priority on this anymore As we moved to sesionless and then this issue no longer reproduces. (But please what else did you think i was referring to? I more get the feeling that you are trying to avoid having to look into the issue than actually providing support)
If you look at the stacktrace that is logged with the message you will notice that the underlying problem is that the code assumes it needs to complete it again.
The issue here is that the lock is volatile and by the time your application attempts to complete the session, the lock is lost.
Look at the code “by the time” it’s 3 lines what time? It’s defer receive defer then complete. Why don’t you validate my repro?
Hi @qsdfplkj, I just faced this issue too and found out which part went wrong.
If we would like to enable session for the queue and would like to set autoComplete
to false
, we have to set it to sessionHandlerOptions
instead of messageHandlerOptions
in host json:
"extensions": {
"serviceBus": {
"sessionHandlerOptions": {
"autoComplete": false
}
}
}
If you are still facing this issue, hope that helps!
Those are in reference to MS Docs in this link on the configurations for host.json for versions 2.x and higher:
If you have isSessionsEnabled set to true, the sessionHandlerOptions is honored. If you have isSessionsEnabled set to false, the messageHandlerOptions is honored.
in host json:
using func.exe writes this to the ouput
Using microsoft.azure: