|   Community   |   Contact Us
Solutions    |    Downloads    |    License    |    Documentation    |    Training    |    Support    |    Customers    |    About Us

NServiceBus v4.0 Beta Release Notes

License and Usage

NServiceBus V4 beta release is provided with an unlimited license for 14 days. Additional extended usage can be provided upon request.

Please use NServiceBus v4 beta release only for your personal learning, evaluation, and non-production use.

A detailed list of all the changes.

Compatibility and Upgrades

Prerequisite: NServiceBus v4.0 requires RavenDB 2.0.0.2261 or later
In order to run NServiceBus v4.0 in beta (non-production environment), RavenDB v2.0 must be installed on the machine on which NServiceBus v4.0 is tested.

NServiceBus installer will automaticly install a RavenDB v2.0 if there is no existing and active installation of RavenDB v2.0 on the machine.
it is possible to manualy validate the current RavenDB installed version by connecting to the RavenDB instance ( http://localhost:8080 ) and locating the bottom status bar where server and client build numbers are noted, build numbers prior to 2000 indecates a RavenDB earlier than v2.0.

If the NServiceBus v4.0 installer finds a RavenDB version prior to v2.0 on the target machine a new instance of RavenDB v2.0 will be installed and no intact will be made to the existing instance.
NServiceBus v4.0 is not compatible with NServiceBus v2.6 (or earlier)
As you can see, a large number of features were added to NServiceBus. As a result, NServiceBus v4.0 is not compatible with NServiceBus v2.6. Furthermore, only messages marked as events (IEvent or DefiningEventsAs()) will be auto-subscribed.
PowerShell cmdlets - breaking changes:
NServiceBus.Host no longer supports /installinfrastructure. Use Powershell cmdlets instead.
Powershell cmdlets have been renamed so that they do not clash with any existing cmdlets. See details below.
Autosubscriptions
Only messages marked as events (IEvent or DefiningEventsAs()) will be auto-subscribed.
Default transaction isolation level
Default transaction isolation level is now ReadCommitted.
To revert to Serializable use:
   Configure
      .Transactions
      .Advanced(settings => settings.IsolationLevel(IsolationLevel.Serializable));
   

New Transports Support and Configuration

Four transports are now out of the box (SqlServer, MSMQ, ActiveMQ and RabbitMQ) with more to come.

Four new transport samples were added to the NServiceBus samples, illustrating how to configure the new transports:
  • Messaging.ActiveMQ
  • Messaging.RabbitMQ
  • Messaging.SqlServer
  • Messaging.MSMQ
These samples are online and included in the MSI installation samples sub-directory.
New configuration APIs were added to simplify the transports configuration and make it consistent across all transports. In your config file, specify a connection string, e.g.:
 
 <connectionStrings>

   <!-- MSMQ -->
   <add name="NServiceBus/Transport" 
        connectionString="deadLetter=true;journal=true;useTransactionalQueues=true;cacheSendConnection=true"/>
			
   <!-- ActiveMQ --> 
   <add name="NServiceBus/Transport" 
        connectionString="ServerUrl=activemq:tcp://localhost:61616"/>
			
   <!-- RabbitMQ--> 
   <add name="NServiceBus/Transport" 
        connectionString="host=localhost"/>
		
   <!-- SqlServer -->
   <add name="NServiceBus/Transport" 
        connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=nservicebus;Integrated Security=True"/>

 </connectionStrings>
		

You then have two options to specify the transport:
  • You can specify it as part of the IConfigureThisEndpoint class declaration, e.g.:
		
    public class EndpointConfig : IConfigureThisEndpoint, AsA_Server, UsingTransport<RabbitMQ>

  • Or you can specify it in the IWantCustomInitialization Init method, e.g.:
  • 		
        public class EndpointConfig : IConfigureThisEndpoint, AsA_Server, IWantCustomInitialization
        {
           public void Init()
           {
              Configure.With()
                 .DefaultBuilder()
                 .UseTransport<RabbitMQ>() 
           }
        }
    
    
    Three new nuget packages for the new transports are also available:
    Example of how to install the NServiceBus.ActiveMQ package:
    (Note that the Nuget packages are defined as pre-release. They will not be listed unless you tell Nuget to show  pre-release packages using the –Prerelease  or -Pre alias flags.)

    PM> Install-Package NServiceBus.ActiveMQ -Pre

    New Transports DLLs
    Add a reference to the new transport DLL’s (in the Binaries directory):
    • NServiceBus.Transports.RabbitMQ.dll
    • NServiceBus.Transports.SQlServer.dll
    • NServiceBus.Transports.ActiveMQ.dll
    (MSMQ is currently in NServiceBus.Core.dll and does not require any additional reference. Nuget adds the reference automatically.)

    Configuration Changes

    XmlMessageSerializer now supports not wrapping messages in a <messages> element for single messages. This makes interoperability with other systems easier.
    To turn on this feature use:
        .XmlSerializer( dontWrapSingleMessages:true )
    
    
    MsmqTransportConfig section has been deprecated in favour of TransportConfig section, e.g.:
        <section name="TransportConfig" type="NServiceBus.Config.TransportConfig, NServiceBus.Core" />
    
        <TransportConfig MaximumConcurrencyLevel="10" MaxRetries="3" MaximumMessageThroughputPerSecond="10" />
    
    
    INeedToInstallSomething is now resolved via the container
    NHibernate Configuration
    NHibernate settings have been simplified use as follows:
    	
      <appSettings>
        <!-- dialect is the only required NHibernate property -->
        <add key="NServiceBus/Persistence/NHibernate/dialect" value="NHibernate.Dialect.MsSql2008Dialect"/>
        <!-- other optional settings examples -->
        <add key="NServiceBus/Persistence/NHibernate/connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/>
        <add key="NServiceBus/Persistence/NHibernate/connection.driver_class" value="NHibernate.Driver.Sql2008ClientDriver"/>
        <!-- For more setting see http://www.nhforge.org/doc/nh/en/#configuration-hibernatejdbc and
             http://www.nhforge.org/doc/nh/en/#configuration-optional -->
      </appSettings> 
      <connectionStrings>
        <!-- Default connection string for all Nhibernate/Sql persisters -->
        <add name="NServiceBus/Persistence" 
             connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=nservicebus;Integrated Security=True" />
           
        <!-- Optional overrides per persister -->
        <add name="NServiceBus/Persistence/NHibernate/Timeout" 
             connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=timeout;Integrated Security=True" />
           
        <add name="NServiceBus/Persistence/NHibernate/Saga" 
             connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=sagas;Integrated Security=True" />
           
        <add name="NServiceBus/Persistence/NHibernate/Subscription" 
             connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=subscription;Integrated Security=True" />
           
        <add name="NServiceBus/Persistence/NHibernate/Gateway" 
             connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=gateway;Integrated Security=True" />
           
        <add name="NServiceBus/Persistence/NHibernate/Distributor" 
             connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=distributor;Integrated Security=True" />
           
      </connectionStrings>
    
    
    Performance Counters
    New throughput performance counters and updated performance counters are now available:

    NServiceBus license installed per machine
    Licenses can now be installed in HKLM, allowing you to install one license per server instead of installing a license per endpoint or per windows account.

    Sample usage:
    LicenseInstaller.exe -m C:\License.xml
    Powershell cmdlets Updates
    NServiceBus Powershell cmdlets have been moved to NServiceBus.PowerShell.dll, so to import it run:

    PM> Import-Module .\NServiceBus.PowerShell.dll

    NServiceBus Powershell cmdlets have been renamed so that they do not clash with any existing cmdlets:
    • Installs a NServiceBus license file.
      Install-NServiceBusLicense
    • Displays all messages in a queue.
      Get-NServiceBusMSMQMessage
    • Displays the NServiceBus installed version.
      Get-NServiceBusVersion
    • Installs DTC on the machine.
      Install-NServiceBusDTC
    • Installs RavenDB on the machine.
      Install-NServiceBusRavenDB
    • Installs NServiceBus performance counters on the machine.
      Install-NServiceBusPerformanceCounters
    • Installs MSMQ on the machine.
      Install-NServiceBusMSMQ
    • Validates if DTC is installed and running on the machine.
      Test-NServiceBusDTCInstallation
    • Ensures RavenDB is on the machine.
      Test-NServiceBusRavenDBInstallation
    • Validates that NServiceBus performance counters are correctly installed on the machine.
      Test-NServiceBusPerformanceCountersInstallation
    • Validates MSMQ is correctly installed on the machine.
      Test-NServiceBusMSMQInstallation
    • Adds the required configuration section to the config file.
      Add-NServiceBusMessageForwardingInCaseOfFaultConfig
    • Shows the default error and audit queues.
      Get-NServiceBusLocalMachineSettings
    • Allows specifying the default error and audit queues.
      Set-NServiceBusLocalMachineSettings
    • NServiceBus.Host no longer supports /installinfrastructure - Use Powershell cmdlets instead
    New Endpoint Configuration API:
    Sample usage:
    	
        Configure.Endpoint.AsSendOnly()
           .Advanced(settings => settings.DisableDurableMessages());
    
        Configure.Transactions.Enable() 
           .Advanced(settings => settings.IsolationLevel(IsolationLevel.Serializable)
           .DefaultTimeout(TimeSpan.FromSeconds(40)) 
           .DisableDistributedTransactions()); 
        
    Embedded RavenDB
    RavenDB is not ilmerged anymore. (It is embedded instead, using https://github.com/Fody/Costura#readme).
    The embedding enables client updates (but may require binding redirects). It also allows passing your own DocumentStore, thereby providing full configuration flexibility.
    Audit and Error Queue Defaults
    Server defaults for audit and error queues can now be specified in the registry (see new Powershell cmdlet Get/Set-NServiceBusLocalMachineSettings above).

    Known issues:

    ActiveMQ requires enabling the Scheduler.
        You can do this by setting schedulerSupport="true" attribute to the configuration in activemq.xml:
     <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" schedulerSupport="true" >
    
    
    ActiveMQ Client connection fails when hostname includes a hyphen
        (see https://issues.apache.org/jira/browse/AMQNET-399).

    NMS Client for ActiveMQ
    The release contains a custom build of Apache.NMS.ActiveMQ.1.5.6 client.
    This custom build fixes the following issues:
    The custom build will be removed as soon as the official NMS client will be updated with the above fixes.

    Installing RavenDB v2 on a machine that already has RavenDB v1.x
    When installing NServiceBus v4.x on a machine where an instance of RavenDB v1.x exists (default listening on port 8080), the installer will identify the existing RavenDB instance and try to capture the next available port (e.g. 8081, 8082 etc.) instead of the default 8080 port. Once an available port is found, the installer installs RavenDB V2 instance as a new Windows service, side-by-side with the existing RavenDB v1.x installation.

    By the end of the installation there will be two RavenDB services running side by side on the machine:
    • RavenDB
    • RavenDB-v2
    In case where there is a need to uninstall RavenDB v2 follow the following steps:
    • Open a command line and navigate to the following directory:
      %Program Files%\NServiceBus.Persistence.v4
    • Execute the following command:
      Raven.Server.exe –uninstall –service-name=RavenDB-v2

    Transport samples do not work under Visual Studio 2010
    All the new transports introduced with NServiceBus 4.0 Beta do work with Visual Studio 2010, the supplied samples currently work only under Visual Studio 2012.
    About NServiceBus    |    Contact Us    |    Privacy    |    Follow us on:   
    Copyright 2010-2013 NServiceBus. All rights reserved