Open Shaked opened 4 years ago
After contacting Azure's support, it seems like that the PHP SDK is not updated and is not using the latest API version.
The ideal solution should be something like:
ServiceBusRestProxy.php
public function getSubscription($topicPath, $subscriptionName) {
$httpCallContext = new HttpCallContext();
$httpCallContext->setMethod(Resources::HTTP_GET);
$httpCallContext->addStatusCode(Resources::STATUS_OK);
$subscriptionPath = sprintf(
Resources::SUBSCRIPTION_PATH,
$topicPath,
$subscriptionName
);
$httpCallContext->setPath($subscriptionPath);
$httpCallContext->setQueryParameters([
+ 'api-version' => '2017-04',
]);
$response = $this->sendHttpContext($httpCallContext);
Which will end up with a larger XML response:
<entry xmlns="http://www.w3.org/2005/Atom"><id>sb://xyz-test.servicebus.windows.net/main/subscriptions/the_tool?api-version=2017-04</id><title type="text">the_tool</title><published>2019-06-18T13:34:15Z</published><updated>2019-07-01T11:20:55Z</updated><link rel="self" href="sb://xyz-test.servicebus.windows.net/main/subscriptions/the_tool?api-version=2017-04"/><content type="application/xml"><SubscriptionDescription xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><LockDuration>PT5M</LockDuration><RequiresSession>false</RequiresSession><DefaultMessageTimeToLive>P10675199DT2H48M5.477S</DefaultMessageTimeToLive><DeadLetteringOnMessageExpiration>false</DeadLetteringOnMessageExpiration><DeadLetteringOnFilterEvaluationExceptions>true</DeadLetteringOnFilterEvaluationExceptions><MessageCount>0</MessageCount><MaxDeliveryCount>10</MaxDeliveryCount><EnableBatchedOperations>true</EnableBatchedOperations><Status>Active</Status><CreatedAt>2019-06-18T13:34:15.9898145Z</CreatedAt><UpdatedAt>2019-07-01T11:20:55.4441927Z</UpdatedAt><AccessedAt>2019-11-11T14:57:09.1763185Z</AccessedAt><CountDetails xmlns:d3p1="http://schemas.microsoft.com/netservices/2011/06/servicebus"><d3p1:ActiveMessageCount>0</d3p1:ActiveMessageCount><d3p1:DeadLetterMessageCount>0</d3p1:DeadLetterMessageCount><d3p1:ScheduledMessageCount>0</d3p1:ScheduledMessageCount><d3p1:TransferMessageCount>0</d3p1:TransferMessageCount><d3p1:TransferDeadLetterMessageCount>0</d3p1:TransferDeadLetterMessageCount></CountDetails><AutoDeleteOnIdle>P10675199DT2H48M5.4775807S</AutoDeleteOnIdle><EntityAvailabilityStatus>Available</EntityAvailabilityStatus></SubscriptionDescription></content></entry>
Are you guys planning to upgrade this SDK at some point?
Thank you Shaked
EDIT:
I have started to work on a solution: https://github.com/Azure/azure-sdk-for-php/compare/master...Shaked:master (which I'm currently using).
However, I doubt I will have the time to follow this repository's guidelines, as it is way too complex and time consuming. Would have been nice to have an automated docker image for that part with a single entry point.
Hello @sergey-shandar ,
Is this repository still under maintenance/development?
Hello,
I'm interested in receiving the
MessageCountDetails
from your API, as I see that it is possible to do by using the C# SDK)Basically I'm trying to get the total count of dead letters per subscription.
AFAIU this should be possible: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dead-letter-queues#path-to-the-dead-letter-queue
However, I could not figure how to get it using the PHP API.
Even when I manually edited the subscription path:
I ended up with this message:
What can I do in order to get this information?
Thank you Shaked