Export (0) Print
Expand All

Getting Started with Service Bus for Windows Server

This section describes how to set up the Service Bus for Windows Server locally and set configuration options. Once the Service Bus for Windows Server is running, you can follow a tutorial that shows how to create a queue, as well as some basic messaging operations. To start developing an application, see Tutorial: First Application.

Install the Service Bus development environment

This section describes the basic steps required to set up Service Bus for Windows Server. Note the following requirements:

  • All SQL instances are placed in a local SQL Server (2008 R2 SP1 or SQL Express 2012) instance.

  • The SQL Browser service must be enabled and running.

  • TCP/IP must be enabled. For more information, see Enable TCP/IP Network Protocol for SQL Server. This includes disabling the firewall on a specific port and enabling SQL Browser services. For more information, see Configure a Windows Firewall for Database Engine Access.

  • If you had an earlier version of the Service Bus installed, make sure the following databases are deleted: SBGatewayDatabase; SBManagementDB; ServiceBusDefaultContainer.

  • Services run with the current user credentials.

  • The installation script requires a domain account.

  • The Service Bus uses an auto-generated certificate.

Replace the following input parameters with values from your environment:

<HostName>
Your host name. Do not use localhost.

<Password>
The password you need to generate certificates. The password must only contain lowercase, uppercase, digit and symbol characters.

Installing the Service Bus

First, be sure to uninstall any existing Windows Fabric services as well as the Service Bus. Then, do the following:

Using a local feed

noteNote
This step is required if you are using a private feed such as Microsoft Connect, or a DVD.

First, be sure to uninstall any existing Windows Fabric services as well as the Service Bus. Then, do the following:

  1. Leave an existing Service Bus farm by calling the Remove-SBHost cmdlet.

  2. Uninstall any previous version of the Service Bus for Windows Server, Windows Fabric, and the Web Platform installer.

  3. Delete the databases that were used by the Service Bus.

Then, do the following:

  1. Install the Microsoft Web Platform Installer 4.0 from http://www.microsoft.com/web/downloads/platform.aspx.

  2. Start the Web Platform Installer.

  3. Click Options, navigate to the directory containing the feed (.xml) file, and then add it.

    noteNote
    This step is required in case you are using a private feed such as Microsoft Connect or a DVD.

  4. Click OK, and then click Windows Azure Service Bus 1.0 in the feed.

  5. Click Install, accept the EULA, and start the setup process.

    noteNote
    You may be asked to restart your computer. Setup will continue after the reboot.

Configure the Service Bus development environment

Configuring the Service Bus using the Configuration Wizard

The configuration wizard guides you through configuring a new Service Bus for Windows Server farm (cluster of servers), joining an existing farm, or leaving a farm that you have already joined. If you decide to create a farm, you can either choose to use the default settings or enter custom values for settings that identify and configure the farm you are creating. Use the following procedure to create a new farm and assign the Service Bus for Windows Server 1.0 server to the farm using the default settings.

After the Web Platform Installer finishes, you can start the Service Bus Configuration Wizard. Use the following procedure:

  1. From the Start menu, click All Programs, and then click Service Bus 1.0. Click Service Bus Configuration to start the Service Bus Configuration Wizard.

    Service Bus Configuration Wizard
  2. Click Using Default Settings (Recommended). The New Farm Configuration dialog appears.

    Service Bus Configuration Wizard
  3. In the SQL SERVER INSTANCE text box, the name of the SQL Server instance on the current computer appears by default. To specify a different SQL Server, type the complete name of the SQL Server instance that will host the databases for the farm. For more information about understanding SQL Server requirements, see the SQL Server section in System Requirements. To verify that the instance name you have entered points to a valid instance, click Test Connection. If the connection is made correctly, a green check mark icon appears next to the button. If an error occurs, a message is displayed in the wizard.

    Service Bus Configuration Wizard The Advanced Options stack panel enables you to specify additional database-related settings, such as SQL AUTHENTICATION MODE and usage of SSL.

  4. Under Configure Service Account, your user ID appears in the USER ID text box to identify the user account under which services run. To change the user ID for the user account, enter a new user ID in the USER ID text box. The user ID must be in the format username@domain-name or domain\user. Then enter the password for that user ID in the PASSWORD text box. The wizard validates the user ID and password combination, and if it finds an error, notifies you to re-enter the user ID and password. The same user credentials are used for Service Bus for Windows Server 1.0 services and Windows Azure Service Bus services.

  5. Under Certificate Generation Key, enter a key in the first text box, and then re-enter it one more time in the text box under CONFIRM CERTIFICATE GENERATION KEY to confirm the first key you entered. The wizard checks the keys to make sure that they match. If the keys do not match, the wizard notifies you to re-enter the keys. Record the key for future use; you will need to provide it every time you add a computer to this farm. The configuration cmdlets use this key for generating certificates. You can specify a custom certificate with the custom settings option.

  6. The Enable firewall rules on this computer check box enables you to indicate whether you are interested in allowing the configuration wizard to create firewall rules. Uncheck this box only if Service Bus clients (your application) will run on the same server as the Service Bus.

  7. Click Next. The wizard displays the Summary screen, which lists the values that you have entered along with the default values for the remaining configuration options. The screen also displays the configuration options and values for the farm as a whole and for Service Bus for Windows Server 1.0 individually. The wizard also validates that the configuration values are valid for this computer. With any error, the wizard displays the error page and does not allow you to proceed further. You can either go back to change the configuration that is causing the error or, if possible, fix the error outside the wizard.

    For some errors, it may not be possible to continue with the default configuration. For example, if the default port used for Service Bus for Windows Server 1.0 management is blocked by some application, it may not be possible to get it unblocked. If it is not possible to continue with the default configuration, you must create the new farm with custom settings.

    Service Bus Configuration Wizard
    TipTip
    If there are errors that you can fix outside the wizard, you can use the re-validate button to validate the configuration.

    TipTip
    If you want to configure using PowerShell, you can generate the script based on the current configuration on this page by clicking the PowerShell Commands link.

  8. Click Apply to approve the listed options, to create the new farm, and to add the server to the new farm. Click Back to return to the New Farm Configuration page and change the entries you have made.

Configuring the Service Bus using PowerShell

The first step is to choose a password to use when generating the certificate. Note that these steps must be executed in a Service Bus PowerShell command window. Create a secure string with your password.

  1. Choose a password to use when generating the certificate. Issue the following command:

    $mycert=ConvertTo-SecureString -string <Password> -force -AsPlainText
    
  2. Create a farm:

    New-SBFarm –SBFarmDBConnectionString "data source=localhost\sqlexpress;integrated security=true" –CertificateAutoGenerationKey $mycert
    
  3. Add a host to the farm

    Add-SBHost -CertificateAutoGenerationKey $mycert -SBFarmDBConnectionString "data source=localhost\sqlexpress; integrated security=true"
    
    noteNote
    You will be prompted for your password.

  4. Check status of the farm

    Get-SBFarmStatus
    
    The expected result should be similar to the following:

    HostName      ProcessName               Status
    --------      -----------               ------
    ...      Service Bus Gateway            Running
    ...      Service Bus Message Broker     Running
    ...      FabricHostSvc                  Running
    
  5. Create your first service namespace

    New-SBNamespace –Name DemoSB –ManageUsers  yourDomain\yourUsername
    
    The expected result should be similar to the following:

    Name                  : <Namespace Name>
    AddressingScheme      : Path
    CreatedTime           : 5/1/2012 5:30:49 PM
    IssuerName            : <Namespace Name>
    IssuerUri             : <Namespace Name>
    ManageUsers           : {<domain\user>}
    Uri                   :
    ServiceIdentifier     :
    PrimarySymmetricKey   : <GUID>
    SecondarySymmetricKey :
    

If you need to reset the auto-generated key, issue the following PowerShell command:

Set-SBCertificateAutoGenerationKey –SBFarmDBConnectionString "data source=<hostname>\sqlexpress;integrated security=true"

See Also


Build Date:

2013-10-18

Community Additions

Show:
© 2014 Microsoft