Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added locking logic to AzureMessageQueueReceiver.GetMessage to resolve failure to get messages from queue. #1312

Closed
wants to merge 1 commit into from

Conversation

joeschick
Copy link
Contributor

Due to concurrent access and the lack of thread-safety, AzureMessageQueueReceiver.GetMessage is, on occasion, failing to read messages from the input queue. There aren't any exceptions, just no messages processed after queue.BeginGetMessages completes, even though there are messages in the input queue. With the addition of the locking logic, the issue appears to be resolved.

…eueReceiver to make AzureMessageQueueReceiver.GetMessage thread-safe.
@SimonCropp
Copy link
Contributor

@joeschick can you add a unit test that verifies this fix?

@SimonCropp
Copy link
Contributor

how about this as an alternative? 786759a

@joeschick
Copy link
Contributor Author

786759a looks good, nice code cleanup.

I don't have a unit test for it. I debugged down to AzureMessageQueueReceiver.GetMessage, saw the lack of thread-safety, made it thread-safe, and the issue was resolved. In my application the issue was intermittent, but happened very frequently. The most obvious occurrences being 100+ subscription messages just sitting in queues with endpoints running as though the queues were empty. How do you suggest writing a unit test for an intermittent issue such as this one?

@ghost ghost assigned SimonCropp Jul 21, 2013
SimonCropp added a commit that referenced this pull request Jul 22, 2013
@SimonCropp SimonCropp closed this Jul 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants