azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

customer feedback on service bus error handling

Open gcheng opened this issue 13 years ago • 6 comments

http://stackoverflow.com/questions/15577926/receiving-non-null-messages-when-receiving-from-empty-azure-servicebus-queue-usi

When retrieving messages from an SB Queue using the Java SDK (0.4.1), a non-null ReceiveQueueMessageResult is returned even if the Queue in question is empty. Calling getValue() on that result returns a non-null BrokeredMessage. How am I supposed to tell that I’ve called receive on an empty Queue? Obviously querying size is not an option in a distributed, concurrent system.

I'm using ReceiveAndDelete Mode and the Queue is newly created so I KNOW it's empty.

According to docs, the underlying call to the API should return a StatusCode of 204. I can not find any way to access that Code in the returned Result or Message.

gcheng avatar Mar 22 '13 21:03 gcheng

Looks like the same issue as in https://github.com/WindowsAzure/azure-sdk-for-java/issues/112

jcookems avatar Mar 22 '13 21:03 jcookems

Pull Request submitted. I'm the StackOverflow question author.

BillAtPros avatar Mar 27 '13 23:03 BillAtPros

the pull request from BillAtPros is pulled against the wrong branch.

https://github.com/WindowsAzure/azure-sdk-for-java/pull/303

gcheng avatar Apr 10 '13 21:04 gcheng

I'm aware. Will correct this as soon as my company's legal gets the CLA back to me and I can get it to you. Sorry for the delay.

BillAtPros avatar Apr 10 '13 22:04 BillAtPros

verify and close

gcheng avatar Apr 29 '13 18:04 gcheng

close.

gcheng avatar Apr 29 '13 23:04 gcheng