Azure Service Bus has various naming size limits and restrictions that developers need to consider when creating queues, topics, subscriptions, and other entities. Here’s an overview of the key naming size limits and restrictions
Namespace Length and Naming Restrictions
- Namespace Name length:
- The maximum length for a namespace name is 50 characters.
- The minimum length for a namespace name is 6 characters.
- Unique Global Namespace:
- Each Service Bus namespace name must be globally unique within Azure, similar to how a DNS name must be unique. This means you cannot have two namespaces with the same name across all Azure regions and subscriptions.
- Allowed Characters:
- Namespaces can include letters (uppercase and lowercase), numbers, and hyphens (-).
- Namespace Name Restrictions:
- The namespace name must start with a letter and end with a letter or number. Names that begin or end with a hyphen (-) are not allowed.
Queues and Topics Length and Naming Restrictions
- Name length:
- The maximum length for the names of queues, topics, subscriptions, and rules is 260 characters.
- The minimum length for a namespace name is 1 character.
- Unique inside a Namespace:
- Each Service Bus queue and topic name must be unique within an Azure Service Bus namespace.
- Allowed Characters:
- Queue and topic scan include lowercase letters, numbers, and hyphens (-).
- Note: Although the creation form allows you to add uppercase letters, all uppercase letters will be automatically converted to lowercase.
- Name Restrictions:
- The namespace name must start with a letter and end with a letter or number. Names that begin or end with a hyphen (-) are not allowed.
Topic Subscription Length and Naming Restrictions
- Name length:
- The maximum length for the names of queues, topics, subscriptions, and rules is 50 characters.
- The minimum length for a namespace name is 1 character.
- Unique inside a Topic:
- Each Service Bus Topic Subscription name must be unique within an Azure Service Bus Topic.
- Allowed Characters:
- Queue and topics can include letters (uppercase and lowercase), numbers, and hyphens (-).
- Name Restrictions:
- The namespace name must start with a letter and end with a letter or number. Names that begin or end with a hyphen (-) are not allowed.
Topic Subscription Filter Length and Naming Restrictions
- Name length:
- The maximum length for the names of queues, topics, subscriptions, and rules is 260 characters.
- The minimum length for a namespace name is 1 character.
- Unique inside a Topic Subscription:
- Each Service Bus queue and topic name must be unique within an Azure Service Bus namespace.
- Allowed Characters:
- Queue and topic scan include letters (uppercase and lowercase), numbers, and hyphens (-).
- Name Restrictions:
- The namespace name must start with a letter and end with a letter or number. Names that begin or end with a hyphen (-) are not allowed.
By adhering to these naming size limits and restrictions, developers can ensure that their Azure Service Bus resources are properly created and managed without running into issues related to naming conventions.
To lazy to read? We’ve got you covered! Check out our video version of this content!
Hope you find this helpful! If you enjoyed the content or found it useful and wish to support our efforts to create more, you can contribute towards purchasing a Star Wars Lego for my son!