-
Notifications
You must be signed in to change notification settings - Fork 52
Message.Complete() fails if time elapsed since receipt more than 2h #249
Comments
It looks, the root of the problem is queue.RenewLocks(ctx, m) failing after 2h 5min. |
I might be wrong but in your code, I think that if the renewlocks call fails just once, you exit the routine silently. the Complete sends a disposition on the receiver link. |
@jhendrixMSFT @richardpark-msft I think that's the same case I mentioned, about link heartbeat? |
Right
Exactly |
If i increase token validity time from 2(default value) to 3 hours, this example works without error. |
Hi @orzel7, We've moved development of this package to the azure-sdk-for-go repo link. (I know you now know this since I've posted it to a few of your issues). I have a test that's similar to this that I'll enhance, but it does seem like the root cause is related to when we lose the lock, which seems to be related to components idling out. There were a few changes in the way that we manage links, which I wrote about more in #246. There is also an additional change we made in how we calculate when the next token renewal occurs. Due to clock drift it's possible for our local time to not match the service time. If we attempt to be too exacting on when we do the next claim renewal we can miss our window, and end up with a connection that gets closed due to lack of authorization. .NET Service Bus has a simple calculation they use which we have replicated into the Go codebase, which does account for this: |
This code fails at
m.Complete(ctx)
if "processing" time took 2h30m with error:*Error{Condition: amqp:connection:forced, Description: The connection was inactive for more than the allowed 300000 milliseconds and is closed by container 'LinkTracker'. TrackingId:5220ced3241b41aa899db806978be5cc_G12, SystemTracker:gateway7, Timestamp:2021-09-03T08:46:10, Info: map[]}
But this code works fine if i change it to Sleep(time.Hour*2)
I've already tested this example with the newest version, 0.11
The text was updated successfully, but these errors were encountered: