Closed phuze closed 5 years ago
Hi @purplekrayons
This should never happen when HTTP request is successful but no queue message is added. If so, there should be some bugs. To help address the root cause, here are 2 steps you can do:
1> $queueClient->createMessage will return CreateMessageResult
object including the inserted message properties. Please check the result is empty or not by calling CreateMessageResult::getQueueMessage()
.
https://github.com/Azure/azure-storage-php/blob/master/azure-storage-queue/src/Queue/Models/CreateMessageResult.php
2> Enable SDK logging by adding a HistoryMiddleware
, find out and send us the request and response of the buggy createMessage
request.
Closing this issue. Unfortunately I did not have time to explore the avenues you recommended with regards to implementing the HistoryMiddleware
and I have never been able to determine why queue messages randomly don't get created yet no errors were thrown.
Since the project was time-sensitive, I opted to address this by reducing the rate at which the application was creating messages. My hunch is that we were simply overloading the queue service.
Which service(blob, file, queue, table) does this issue concern?
queue
Which version of the SDK was used?
dev-master
What's the PHP/OS version?
7.2.9
I encountered a situation where a message was not written to queue, yet no errors were triggered. It just simply wasn't created. This leaves me with a question --- how do I REALLY know if the message was successfully added?
If you refer to my function
addToQueue()
, you'll note its inside a try block, and assuming all goes well, simply returns true (successful). However, there's no actual check in place (I didn't think I needed one until today). Noting that there was no exception thrown/caught.