Export (0) Print
Expand All

How to: Publish a Service to the Service Bus Registry

Updated: June 17, 2014

The Microsoft.ServiceBus.ServiceRegistrySettings endpoint behavior gives you control over how a given service is published in the Service Registry. By default, all services are "cloaked" and are not visible in the Service Registry ATOM feed.

The following table lists the properties that you can set on the ServiceRegistrySettings endpoint:

 

Microsoft.ServiceBus.ServiceRegistrySettings properties Description

Microsoft.ServiceBus.ServiceRegistrySettings.DisplayName

This is the display name for the endpoint and is used as the <title> field for the endpoint in the discovery ATOM feed. By default, the Microsoft.ServiceBus.ServiceRegistrySettings.DisplayName property is set to the last segment of the service URI.

Microsoft.ServiceBus.ServiceRegistrySettings.DiscoveryMode

This property is set to the Microsoft.ServiceBus.DiscoveryType.Public or Microsoft.ServiceBus.DiscoveryType.Private values, with the latter being the default. If you set this property to Public, the endpoint is published into the Service Registry ATOM feed.

To add an Application to the Service Bus registry

  1. Create an instance of the ServiceRegistrySettings behavior, using the Public parameter.

    ServiceRegistrySettings serviceRegistrySettings = new ServiceRegistrySettings(DiscoveryType.Public);
    serviceRegistrySettings.DisplayName = "MyService";
    
  2. Add the description to the associated endpoint.

    foreach (ServiceEndpoint subscriberEndpoint in subscriberHost.Description.Endpoints)
    {
        subscriberEndpoint.Behaviors.Add(serviceRegistrySettings);
    }
    
    

Community Additions

ADD
Show:
© 2014 Microsoft