Service Namespaces

 

Applies To: Service Bus for Windows Server 1.1

With the Service Bus for Windows Server, a service namespace is used for addressing, isolation, and management. All Service Bus messaging entities are created within the scope of a service namespace.

Service Namespaces

A Service Bus for Windows Server deployment (farm) can serve as a messaging platform for multiple applications in a multi-tenant way. For isolation, each application uses a separate service namespace.

With the Microsoft Azure Service Bus (the cloud service), all Service Bus messaging entities are addressed with a path that starts with the name of the service namespace. The Service Bus for Windows Server uses a similar approach to using service namespaces, but extends the cloud schema to support specifying server names. Thus, by default service namespace names in the Service Bus for Windows Server are addressed with a path that starts with the machine name. The Service Bus for Windows Server enables you to create service namespace using one of the following addressing schemas:

  1. A path-based address (the default), that uses the fully-qualified domain name (FQDN) of the Service Bus hosts. The service URI for this schema appears as follows:

    {scheme}://{baseUri}:Port/{serviceNamespace}/{resourcePath}
    
  2. A DNS-registered namespace schema that supports DNS capabilities. By using DNS, you can decouple the actual server nodes (FQDN) from clients using the Service Bus. In other words, when you create a service namespace with a DNS-registered schema, you provide the URI that is registered in your DNS. The service URI is similar to the following:

    {scheme}://{DNSValue}/{resourcePath}
    

Service Bus for Windows Server service namespaces enable administrators to authorize which users own the service namespace. When creating a service namespace (or at a later time), the administrator points to a list of domain users who serve as the owners of the service namespace. The service namespace owners are granted permission to create, modify, and delete Service Bus messaging entities (queues and topics). These owners can also manage claims to all Service Bus messaging entities. A service namespace owner can define additional authorization rules per Service Bus entity (queue, topic, or subscription).

For more information, see the Service Bus Authentication and Authorization section.

Creating Service Namespaces

You can create a Service Bus for Windows Server service namespace using the New-SBNamespace cmdlet:

New-SBNamespace -ManageUsers <String[]> -Name <String> [-AddressingScheme <NamespaceFormat> ] [-DnsEntry <String> ] [-IssuerName <String> ] [-IssuerUri <String> ] [-PrimarySymmetricKey <String> ] [-SecondarySymmetricKey <String> ] [-SubscriptionId <Guid> ] [ <CommonParameters>]

For example, the following command creates a Service Bus for Windows Server service namespace named MyNamespace1 with path-based addressing. It assigns user1 to be its owner:

New-SBNamespace -Name MyNamespace1 -ManageUsers user1@domain1

Important

You must specify Service Bus for Windows Server namespace names in Western (Latin) characters only.