azure-service-bus-dotnet icon indicating copy to clipboard operation
azure-service-bus-dotnet copied to clipboard

Namespace Management Access REST API - Partitioned Topics

Open KZeronimo opened this issue 7 years ago • 7 comments

Actual Behavior

  1. When utilizing the Namespace Access REST API to PUT a partitioned topic with the following atom
<?xml version="1.0" encoding="utf-8" ?>  
<entry xmlns="http://www.w3.org/2005/Atom">  
  <content type="application/xml">  
    <TopicDescription xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect">
       <EnablePartitioning>false</EnablePartitioning>
    </TopicDescription>
  </content>  
</entry>

the response is

<Error>
    <Code>400</Code>
    <Detail>SubCode=40000. The entity description of type 'TopicDescription' has unsupported properties for api-version '' in the request. Try including the correct api-version query string in the request. TrackingId:b7ed4e38-2d1b-49e7-bd03-afb6eb9684fe_G30, SystemTracker:abidasvcsbtklcusedev.servicebus.windows.net:foo, Timestamp:10/26/2017 4:57:15 PM</Detail>
</Error>
  1. When performing a GET against a topic that was created thru the AZ portal with partitioning enabled we see the following response
<entry xmlns="http://www.w3.org/2005/Atom">
    <id>https://abidasvcsbtklcusedev.servicebus.windows.net/timeseries</id>
    <title type="text">timeseries</title>
    <published>2017-10-26T15:08:50Z</published>
    <updated>2017-10-26T15:08:50Z</updated>
    <author>
        <name>abidasvcsbtklcusedev</name>
    </author>
    <link rel="self" href="https://abidasvcsbtklcusedev.servicebus.windows.net/timeseries"/>
    <content type="application/xml">
        <TopicDescription xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <DefaultMessageTimeToLive>P14D</DefaultMessageTimeToLive>
            <MaxSizeInMegabytes>16384</MaxSizeInMegabytes>
            <RequiresDuplicateDetection>false</RequiresDuplicateDetection>
            <DuplicateDetectionHistoryTimeWindow>PT10M</DuplicateDetectionHistoryTimeWindow>
            <EnableBatchedOperations>true</EnableBatchedOperations>
            <SizeInBytes>0</SizeInBytes>
        </TopicDescription>
    </content>
</entry>
  1. Note there is no observance of partitioning in the response

Expected Behavior

  1. REST API supports the property set for Topics (we haven't checked but we would expect full support for Queues, Subscriptions, and Rules)
  2. The documentation states the following for TopicDescription - EnablePartitioning is available as a property

Topics are described with <TopicDescription> element. The detail schema for the element can be directly inferred from the TopicDescription .NET Framework class.

We are trying to follow the guidance for management operations with a SAS token management operations requiring service principal is a non starter - we are basing are approach on the following from the referenced issue

For "right here and right now", there is a fully supported REST API endpoint that you can continue to use, and doing so will completely unblock any blocked scenarios you might have.

Versions

It's unclear what version of the REST API we are using

KZeronimo avatar Oct 26 '17 17:10 KZeronimo

Any update or guidance on this issue - ty

KZeronimo avatar Nov 16 '17 20:11 KZeronimo

Ping - any update on rounding out the REST API wrt full property support? The repro I initially provided is still blocking us from leveraging the REST API for mgmt plane operations.

ghost avatar Jan 26 '18 21:01 ghost

Passing a valid api verison should fix the issue. They likely can use the newest: Here is one valid version: 2017-11

Here you can see how to do that: https://docs.microsoft.com/en-us/rest/api/

Search for API version. Also replying that to the github issue. Please let me know if this helps.

ChristianWolf42 avatar Feb 05 '18 20:02 ChristianWolf42

Passing a version does expose more properties - btw I get an error with 2017-11 and the latest available is 2017-04

We will continue to test out - we need to manage topics, and subscriptions with filter rules

KZeronimo avatar Feb 05 '18 20:02 KZeronimo

Odd as 2017-11 is what I pulled out of the broker code. Then use 2017-04. If you use the version does it help the performance? We work on a management api for the new client libraries but it will still take a little while till we deliver that.

ChristianWolf42 avatar Feb 05 '18 22:02 ChristianWolf42

I'll report back here if the set of management operations we need are available - the explicit version is helping expose more operations - we will test performance as well

KZeronimo avatar Feb 06 '18 18:02 KZeronimo

Sounds good, please let me know.

ChristianWolf42 avatar Feb 06 '18 20:02 ChristianWolf42