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

Get-AzureRmServiceBusTopic does not return more than 100 topics #6891

Closed
wxwr opened this issue Aug 9, 2018 · 7 comments
Closed

Get-AzureRmServiceBusTopic does not return more than 100 topics #6891

wxwr opened this issue Aug 9, 2018 · 7 comments
Assignees
Labels
More Info 🏷️ Service Attention This issue is responsible by Azure service team. Service Bus

Comments

@wxwr
Copy link

wxwr commented Aug 9, 2018

Description

Get-AzureRmServiceBusTopic is ignoring nextLink parameter consequently does not return more than 100 topics.
please also check queue cmdlet (Get-AzureRmServiceBusQueue)

Script

Create more than 100 topics on the Service Bus namespace and run Get-AzureRmServiceBusTopic
New-AzureRmServiceBusTopic -ResourceGroup RGNAME -NamespaceName NAMESPACENAME -TopicName topic1 -EnablePartitioning $True

New-AzureRmServiceBusTopic -ResourceGroup _RGNAME_ -NamespaceName _NAMESPACENAME_ -TopicName topic1 -EnablePartitioning $True

Module Version

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     6.6.0      AzureRM

Debug Output

Get-AzureRmServiceBusTopic -ResourceGroupName sbwagn -Namespace sbwagn -debug
DEBUG: 15:17:00 - GetAzureRmServiceBusTopic begin processing with ParameterSet '__AllParameterSets'.
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/5cb3cf34-4222-4971-8a5d-5c5093a78fff/resourceGroups/sbwagn/providers/Microsoft.ServiceBus/namespaces/sbwagn/topics?api-version=2017-04-01

Headers:
x-ms-client-request-id        : 9d3ec8b1-d44b-4d38-870e-b6976f91a814
accept-language               : en-US

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-inline-count             : 
x-ms-request-id               : 3da1ddc8-66c3-4e02-be00-d4d41399eff3_M2SN1_M2SN1
Server-SB                     : Service-Bus-Resource-Provider/SN1
Cache-Control                 : no-cache
Server                        : Service-Bus-Resource-Provider/SN1,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 14979
x-ms-correlation-request-id   : 68d57795-657b-4069-bab3-69f06d6b668c
x-ms-routing-request-id       : BRAZILSOUTH:20180809T181706Z:68d57795-657b-4069-bab3-69f06d6b668c
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Thu, 09 Aug 2018 18:17:05 GMT

Body:
{
  "value": [
    {
      "id": "/subscriptions/5cb3cf34-4222-4971-8a5d-5c5093a78fff/resourceGroups/sbwagn/providers/Microsoft.ServiceBus/namespaces/sbwagn/topics/exampletesttopic",
      "name": "exampletesttopic",
      "type": "Microsoft.ServiceBus/Namespaces/Topics",
      "location": "Brazil South",
      "properties": {
        "defaultMessageTimeToLive": "PT5M",
        "maxSizeInMegabytes": 1024,
        "requiresDuplicateDetection": false,
        "duplicateDetectionHistoryTimeWindow": "PT10M",
        "enableBatchedOperations": true,
        "sizeInBytes": 0,
        "status": "Active",
        "supportOrdering": true,
        "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S",
        "enablePartitioning": false,
        "enableExpress": false,
        "createdAt": "2018-06-07T20:29:38.75Z",
        "updatedAt": "2018-06-07T20:29:38.843Z",
        "accessedAt": "0001-01-01T00:00:00Z",
        "subscriptionCount": 0,
        "countDetails": {
          "activeMessageCount": 0,
          "deadLetterMessageCount": 0,
          "scheduledMessageCount": 0,
          "transferMessageCount": 0,
          "transferDeadLetterMessageCount": 0
        }
      }
    },

	************SUPPRESSED************
	
    {
      "id": "/subscriptions/5cb3cf34-4222-4971-8a5d-5c5093a78fff/resourceGroups/sbwagn/providers/Microsoft.ServiceBus/namespaces/sbwagn/topics/sb-topic_exampl190",
      "name": "sb-topic_exampl190",
      "type": "Microsoft.ServiceBus/Namespaces/Topics",
      "location": "Brazil South",
      "properties": {
        "defaultMessageTimeToLive": "P10675199DT2H48M5.4775807S",
        "maxSizeInMegabytes": 81920,
        "requiresDuplicateDetection": false,
        "duplicateDetectionHistoryTimeWindow": "PT10M",
        "enableBatchedOperations": true,
        "sizeInBytes": 0,
        "status": "Active",
        "supportOrdering": false,
        "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S",
        "enablePartitioning": true,
        "enableExpress": false,
        "createdAt": "2018-08-09T17:35:42.667Z",
        "updatedAt": "2018-08-09T17:35:43.137Z",
        "accessedAt": "0001-01-01T00:00:00Z",
        "subscriptionCount": 0,
        "countDetails": {
          "activeMessageCount": 0,
          "deadLetterMessageCount": 0,
          "scheduledMessageCount": 0,
          "transferMessageCount": 0,
          "transferDeadLetterMessageCount": 0
        }
      }
    }
  ],
"nextLink": "https://management.azure.com/subscriptions/5cb3cf34-4222-4971-8a5d-5c5093a78fff/resourceGroups/sbwagn/providers/Microsoft.ServiceBus/namespaces/sbwagn/topics?api-version=2017-04-01&$skip=100&$top=100"
}


Name                                : exampletesttopic
Id                                  : /subscriptions/5cb3cf34-4222-4971-8a5d-5c5093a78fff/resourceGroups/sbwagn/provide
                                      rs/Microsoft.ServiceBus/namespaces/sbwagn/topics/exampletesttopic
Type                                : Microsoft.ServiceBus/Namespaces/Topics
AccessedAt                          : 01/01/0001 00:00:00
AutoDeleteOnIdle                    : P10675199DT2H48M5.4775807S
CreatedAt                           : 06/07/2018 20:29:38
CountDetails                        : Microsoft.Azure.Management.ServiceBus.Models.MessageCountDetails
DefaultMessageTimeToLive            : PT5M
DuplicateDetectionHistoryTimeWindow : PT10M
EnableBatchedOperations             : True
EnableExpress                       : False
EnablePartitioning                  : False
MaxSizeInMegabytes                  : 1024
RequiresDuplicateDetection          : False
SizeInBytes                         : 0
Status                              : Active
SubscriptionCount                   : 0
SupportOrdering                     : True
UpdatedAt                           : 06/07/2018 20:29:38


	************SUPPRESSED************


Name                                : sb-topic_exampl190
Id                                  : /subscriptions/5cb3cf34-4222-4971-8a5d-5c5093a78fff/resourceGroups/sbwagn/provide
                                      rs/Microsoft.ServiceBus/namespaces/sbwagn/topics/sb-topic_exampl190
Type                                : Microsoft.ServiceBus/Namespaces/Topics
AccessedAt                          : 01/01/0001 00:00:00
AutoDeleteOnIdle                    : P10675199DT2H48M5.4775807S
CreatedAt                           : 08/09/2018 17:35:42
CountDetails                        : Microsoft.Azure.Management.ServiceBus.Models.MessageCountDetails
DefaultMessageTimeToLive            : P10675199DT2H48M5.4775807S
DuplicateDetectionHistoryTimeWindow : PT10M
EnableBatchedOperations             : True
EnableExpress                       : False
EnablePartitioning                  : True
MaxSizeInMegabytes                  : 81920
RequiresDuplicateDetection          : False
SizeInBytes                         : 0
Status                              : Active
SubscriptionCount                   : 0
SupportOrdering                     : False
UpdatedAt                           : 08/09/2018 17:35:43

DEBUG: AzureQoSEvent: CommandName - Get-AzureRmServiceBusTopic; IsSuccess - True; Duration - 00:00:09.6115451; Exception - ;
DEBUG: Finish sending metric.
DEBUG: 15:17:10 - GetAzureRmServiceBusTopic end processing.
DEBUG: 15:17:10 - GetAzureRmServiceBusTopic end processing.
@maddieclayton
Copy link
Contributor

@v-Ajnava Can you take a look at this issue?

@v-Ajnava
Copy link
Member

v-Ajnava commented Aug 13, 2018

@wagsousa, if the namespace is standard, you can create 100 topics with EnablePartitioning $True,
the number of topics to be displayed can be mentioned in -MaxCount parameter of the Get cmdlets.

by default - without -MaxCount parameter, get cmdlets will give you 100 resources.

please try the get cmdlets with -Maxcount with latest AzureRm release and let me know if still face the issue.

@wxwr
Copy link
Author

wxwr commented Aug 21, 2018

I tested with 103 topics and MaxCount to 200 and I don't see the issue but we can create up to 10k topics/queues with EnablePartitioning $False.
Default command (without MaxCount which is not required) returning 100 only it may seem that namespace has 100 topics only but I believe this is by design since 10k may be too much for a single command.
Is it possible to add a message that by default first 100 only will be returned?

@v-Ajnava
Copy link
Member

@wagsousa will add the message in the cmdlet help and update the thread.

@maddieclayton
Copy link
Contributor

Closing as fixed.

@bsiegel bsiegel added the Service Attention This issue is responsible by Azure service team. label Sep 26, 2018
@AceHack
Copy link

AceHack commented May 9, 2019

I can't access topics more than 1000, I'm trying to iterate through all topics and make an update, this seems impossible with powershell, is that true?

@v-Ajnava
Copy link
Member

@AceHack, can you please help us the command you are using to get the topics and also the namespace you are using here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
More Info 🏷️ Service Attention This issue is responsible by Azure service team. Service Bus
Projects
None yet
Development

No branches or pull requests

5 participants