-
Notifications
You must be signed in to change notification settings - Fork 118
Message's DeliveryCount should not be modified when a message is peeked #589
Comments
Given that |
Thanks Sean. I am curious to know why you say that delivery count is meaningless in this case. Wouldn't it create confusion in borderline cases? For example, if I have max delivery count is set as 10 and the actual delivery count is 9 but SDK is reporting it as 10 (because it adds 1 to it). |
What I meant by meaningless is that in the context of a peek operation, there's no delivery. Therefore count doesn't matter. From a correctness point of view, that's a silly bug and should be addressed. Let me fix it. |
Thanks! |
Re-opened so that when the fix is merged this would get closed. |
PR is pending. |
Fixes #589 * Verification test * Differentiate between peek and receive operations * Indicate peek operation * Additional test case to verify behavior when message is received * Test delivery count on peek against real queue * Test delivery count on peeklock against real queue
Actual Behavior
Expected Behavior
This is more of a clarification question. Let's say I create a queue and send 1 message to that queue. Immediately after sending the message, I fetch that message using
PeekAsync()
.It is my understanding that because I am just peeking the message and not locking it, the delivery count of that message should not change and I am expecting the delivery count to be
0
. However what I am noticing is that the delivery count of that message is1
. If we look at the codehere
, you will notice that SDK is adding 1 to the value returned by the Service Bus.I am curious to know why SDK is doing this.
The text was updated successfully, but these errors were encountered: