Skip to content

Releases: Particular/NServiceBus

4.6.0

01 May 06:30
Compare
Choose a tag to compare

As part of this release we had 53 commits which resulted in 14 issues being closed.

Improvements

#2065 Assembly scanner improvements

  • Allow to configure the Assembly scanner to not throw exceptions
  • If we find a valid IEndpointConfig, we should skip scanning
  • If there are errors, but if we can find endpoint config, we continue, but don't pass in bad assemblies.
    So only do this if there are no errors:
 if (arguments.ScannedAssemblies.Count > 0 -- && no errors)
 {
 serviceCommandLine.AddRange(arguments.ScannedAssemblies.Select(assembly =>    String.Format(@"/scannedAssemblies:""{0}""", assembly)));
 }
  • The host should not throw, so that we can still start the endpoint AppDomain so that any binding redirects kick in
    Content trimmed. See full issue

#2012 Remove the warning when a 4.x endpoint receives an event from a 3.x pub, when the event is an interface.

  • Relates to #1834
  • Refactored the MessageMetadataRegistry class.
  • Facilitated to remove the un-necessary warning which is displayed when a 3.x endpoint publishes an event which is an interface, where the 3.x endpoint added an __impl to the event type in the header.

#1983 Obsolete IBus.InMemory

So there are several confusion of this API

  • Do Mutators run?
  • Is it run in the same transaction?
  • can complex+deep messages be sent? do they need to be serialized?
  • does encryption run? should they?
  • are databus properties supported?
  • can a saga be started from InMemory?
  • does the inMemory handler get an isolated set of headers or are they shared with the original message?
  • of the standard message actions (Send, Publish, Reply, Return, Timeout) what ones does InMemory support?
  • do FLR and SLR come into play?
    Content trimmed. See full issue

#1893 When a message is forwarded to the error queue, the stack trace of the exception is too large

When a message is forwarded to the error queue, the stack trace that is stored in the header information for the message in the error queue is currently too long. We should include the inner exception that caused the problem instead of the entire stack trace which includes the entire pipeline steps.

#1313 Remove CLS compliance

So in all our assembly attributes we say we are CLS compliant. However we are not. See warnings below

We need to do some significant breaking changes to achieve this.

Warning 58  Type of 'EasyNetQ.ConnectionFactoryInfo.ConnectionFactory' is not CLS-compliant C:\Code\NServiceBus\src\RabbitMQ\NServiceBus.RabbitMQ\EasyNetQ\ConnectionFactoryInfo.cs 13  34  NServiceBus.Transports.RabbitMQ
Warning 52  Type of 'EasyNetQ.HostConfiguration.Port' is not CLS-compliant  C:\Code\NServiceBus\src\RabbitMQ\NServiceBus.RabbitMQ\EasyNetQ\HostConfiguration.cs 6   23  NServiceBus.Transports.RabbitMQ
Warning 51  Type of 'EasyNetQ.IHostConfiguration.Port' is not CLS-compliant C:\Code\NServiceBus\src\RabbitMQ\NServiceBus.RabbitMQ\EasyNetQ\IHostConfiguration.cs    6   16  NServiceBus.Transports.RabbitMQ
Warning 41  Type of 'NServiceBus.SagaPersisters.Azure.DictionaryTableEntity.this[string]' is not CLS-compliant  C:\Code\NServiceBus\src\azure\NServiceBus.Azure\SagaPersisters\Azure\DictionaryTableEntity.cs   154 31  NServiceBus.Azure
Warning 123 Type of 'NServiceBus.Serializers.XML.Test.MessageWithLists.SBytes' is not CLS-compliant C:\Code\NServiceBus\src\NServiceBus.Core.Tests\Serializers\XML\ListTests.cs 76  28  NServiceBus.Core.Tests

Content trimmed. See full issue

Bugs

#2064 NServiceBus Host 4.5.0 causing assembly scanning exception

After upgrading to 4.5, I've started to get an exception with the NServiceBus Host:

Unhandled Exception: System.Exception: Could not enumerate all types for 'C:\Ser
vices\Server\FluentNHibernate.dll'.

   at NServiceBus.Hosting.Helpers.AssemblyScanner.ScanAssembly(String assemblyPa
th, AssemblyScannerResults results) in c:\BuildAgent\work\31f8c64a6e8a2d7c\src\N
ServiceBus.Core\Hosting\Helpers\AssemblyScanner.cs:line 149
   at NServiceBus.Hosting.Helpers.AssemblyScanner.GetScannableAssemblies() in c:
\BuildAgent\work\31f8c64a6e8a2d7c\src\NServiceBus.Core\Hosting\Helpers\AssemblyS

Content trimmed. See full issue

#2061 Registry trial license cannot be written using default LocalSystem

The trial license won't work if NServiceBus is running as LocalSystem
Here is the error:

2014-04-17 14:29:21,257 [4] FATAL NServiceBus.Licensing.LicenseManager [(null)] <(null)> - Could not access registry for the current user sid. Please ensure that the license has been properly installed.

And this is on purpose because LocalSystem does not have a HKCU, see https://github.com/Particular/NServiceBus/blob/develop/src/NServiceBus.Core/Licensing/LicenseManager.cs#L53

#2057 EndpointConfig.cs can get overwritten

When IConfigureThisEndpoint implementation is in a different project EndpointConfig.cs content gets replaced with the default empty template.

To replicate this create a VS solution with 2 2 projects and in proj1 add:

public abstract class BaseClass : IConfigureThisEndpoint, IWantCustomInitialization
{
    public void Init()
    {
    }
}

Content trimmed. See full issue

Where to get it

You can download this release from nuget

4.5.1

23 Apr 02:06
Compare
Choose a tag to compare

As part of this release we had 2 commits which resulted in 1 issue being closed.

Bugs

#2058 When starting a new NServiceBus Host as a standard user, exception occurs during the check for license

Steps to repro

  1. Create a NSB host (which is not started as administrator)
  2. Run the nservicebus.host /install to create the queues and make it run as a user who is a Standard User.
  3. The service fails to start. See the following exception:
2014-04-16 12:09:29,107 [5] INFO  NServiceBus.Configure [(null)] <(null)> - Invocation of NServiceBus.IWantToRunBeforeConfiguration completed in 0.08 s
2014-04-16 12:09:29,270 [5] INFO  NServiceBus.Configure [(null)] <(null)> - Invocation of NServiceBus.Config.INeedInitialization completed in 0.00 s
2014-04-16 12:09:29,278 [5] FATAL NServiceBus.Hosting.GenericHost [(null)] <(null)> - Exception when starting endpoint.
System.Exception: Failed to access 'HKEY_LOCAL_MACHINE : SOFTWARE\ParticularSoftware : License'. Do you have permission to write to this key? ---> System.UnauthorizedAccessException: Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\ParticularSoftware' is denied.
   at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)

Content trimmed. See full issue

Where to get it

You can download this release from:

4.5.0

16 Apr 16:18
Compare
Choose a tag to compare

This release consist of these issues that were achieved through these commits.

Features

#1953 Improve the experience for first time users installing NServiceBus via NuGet

This only applies to new users. If we detect that NServiceBus/the platform is already installed on their machine we do nothing. Existing installs can be detected in 2 ways:

  1. The "MachinePrepared" regkey
  2. The platform installer hasn't been installed (will be introduced when the PI is ready - TBD sync with the PI specs)
Scenarios
New user joining an existing team opening up the solution for the first time

init.ps1 will detect this and pop this page in the vs browser:
http://particular.net/download-the-particular-service-platform?version={nservicebus version}

Content trimmed. See full issue

Improvements

#2023 Update the license dialog to the new platform design

This depends on the license pull

#2022

#1991 Change unlicensed behaviour to be even more safe for production

Relax current behaviour
  • Remove the 1 msg/s throttling
  • Remove the MaxWorkerNodes limitation from the distributor (please confirm @udidahan )
Introduce new behaviour when no valid license is found

Relates to #1993

#1965 Provide icon to NServiceBus.Host.exe

It would be nice if you setup application icon in nservicebus.host.exe. This icon could simplify recognizing if this app on my task bar is nservicebus.host.exe or maybe ConsoleApplication11.exe. The same when I'm looking for nservicebus.host.exe in windows explorer.

Bugs

#2051 Workers use the wrong reply to address

The reply to address of the workers are wrongly rewritten the distributors control address instead of the main address

This was broken in 4.4.2 by this change:

54a1da3

#2036 LicenseExpirationChecker.HasLicenseDateExpired throws exception

Unhandled Exception: System.ArgumentOutOfRangeException: The added or subtracted value results in an un-representable Da
teTime.
Parameter name: value
   at System.DateTime.AddTicks(Int64 value)
   at Particular.Licensing.LicenseExpirationChecker.HasLicenseDateExpired(DateTime licenseDate) in c:\Projects\NServiceB
us\src\NServiceBus.Core\App_Packages\Particular.Licensing\LicenseExpirationChecker.cs:line 28
   at Particular.Licensing.LicenseExpirationChecker.HasLicenseExpired(License license) in c:\Projects\NServiceBus\src\NS
erviceBus.Core\App_Packages\Particular.Licensing\LicenseExpirationChecker.cs:line 9
   at NServiceBus.Licensing.LicenseManager.InitializeLicense() in c:\Projects\NServiceBus\src\NServiceBus.Core\Licensing
\LicenseManager.cs:line 99

Content trimmed. See full issue

#2001 Trial dialog corrupting SynchronizationContext

So when we show a windows form dialog it will set (or overwrite) the SynchronizationContext.Current. This will result in callbacks being executed on SynchronizationContext of the dialog and not the SynchronizationContext of the executing process..

So the proposal for fixing this is to

  • store SynchronizationContext.Current
  • show license dialog
  • pass the stored SynchronizationContext back to SynchronizationContext.SetSynchronizationContext

Thoughts?

#1972 log4net.Core.Level.ToString not found

If you configure your endpoint to use log4net like this:

        XmlConfigurator.Configure();
        Configure.With()
            .Log4Net()
            .AutofacBuilder(container)
            .FileShareDataBus(BasePath)
            .RavenSubscriptionStorage()
            .UseRavenTimeoutPersister()
            .UnicastBus();

Content trimmed. See full issue

#1947 Exceptions during startup is no longer logged in 4.3.0

If you use the regular host and an exception is thrown in either IWantCustomInitialization or INeedInitialization (and probably others), no error is logged. Instead, the service just dies with no indication of what the error was. This makes it quite difficult to troubleshoot errors when the host runs as a service.

This used to be logged as a fatal error in NSB 3.3.

#1827 SingleCallChannelReceiver doesn't work with unity

SingleCallChannelReceiver doesn't work with UnityBuilder.

Logs with UnityBuilder:

2013-12-02 10:04:43.9703 DEBUG NServiceBus.Gateway.Receiving.IdempotentChannelReceiver Received message of type SingleCallSubmit for client id: 4e5cde3c-b09e-4943-8379-b5a5f88d589e 
2013-12-02 10:04:43.9863 DEBUG NServiceBus.Gateway.Channels.Http.HttpChannelReceiver Sending HTTP 200 response. 
2013-12-02 10:04:44.0143 DEBUG NServiceBus.Gateway.Channels.Http.HttpChannelReceiver Http request processing complete.

When I change builder from UnityBuilder to DefaultBuilder log looks like this:

2013-12-02 10:18:44.5661 DEBUG NServiceBus.Gateway Received message of type SingleCallSubmit for client id: 9a85fc19-dd91-411d-9f82-2f7c793236ed 

Content trimmed. See full issue

Where to get it

You can download this release from:

4.2.1

02 May 11:49
Compare
Choose a tag to compare

As part of this release we had 5 commits which resulted in 1 issue being closed.

Bugs

#1943 Cant Send in 4.2 and Return in 3.x

When a 3.X endpoint does a Bus.Return that targets a 4.2.0 endpoint the v4 endpoint can't process the message. This makes it wire incompatible.

repro https://github.com/Particular/BugsRepro/tree/master/1943MissingCompletionMessage

So in a 4.2 endpoint

Bus.Send("Returner", new Message())
  .Register<int>(i => Debug.WriteLine(i));

Content trimmed. See full issue

Where to get it

You can download this release from:

4.4.2

27 Feb 18:49
Compare
Choose a tag to compare

This release consist of these issues that were achieved through these commits.

Bugs

#1979 Subscriptions pointing to wrong queue when local address is overriden

They point to the endpointname instead of the override. It was caused by logic related to the distributor that always changed the replyto header of subscription messages to the endpoint name.

It was discovered by investigating a windows azure related issue: Particular/NServiceBus.Azure#122

Where to get it

You can download this release from:

4.4.1

26 Feb 12:14
Compare
Choose a tag to compare

This release consist of these issues that were achieved through these commits.

Bugs

#1964 Failure to configure bus from command line application

I have a simple console application that configures a bus (MSMQ) and sends a single message. Between version 4.3.4 and 4.4.0 the application has stopped working with the exception in the stack trace below.

Note that this only happens when running from a command window. It does not happen when running from visual studio (using host process or not). In both cases I am running in a non-elevated context.

In case it is down to user error, here is the guts of the bus configuration code that is failing:

Configure.Serialization.Xml();
bus = Configure.With()
    .Log4Net()
    .DefaultBuilder()

Content trimmed. See full issue

Where to get it

You can download this release from:

4.4.0

12 Feb 04:29
Compare
Choose a tag to compare

This release consist of these issues that were achieved through these commits.

Before applying this release it is recommended that your read the release notes for 4.3.4 to check if the issue #1925 applies to you. #1925 When using NServiceBus version 4.3.x and an event is sent through a Distributor it is incorrectly received by multiple workers instead of just one.

Improvements

#1905 Add OriginatingHostId and ProcessingHostId headers that represent the current "host"

We currently have the ProcessingMachine and OriginatingMachine headers. These do not accurately reflect all concepts of a "Host". For example when hosting in Azure.

So the headers OriginatingHostId, HostId and HostDisplayName have been added to be environment agnostic where "machine" does not make sense.

The headers ProcessingMachine and OriginatingMachine have been marked as obsolete and will be removed in 5.0.

#1872 Raise a critical exception if IWantToRunWhenBusStartsAndStops Start or Stop throws an exception

Currently if the IWantToRunWhenBusStartsAndStops methods Start or Stop throw an exception the endpoint still starts.

This can hides critical issues from the user.

We now raise a critical exception that will shutdown the bus.

#1627 Prefer TryGetValue instead of ContainsKey + Item lookups

So a ContainsKey + Item lookup takes approx twice as long as a TryGetValue

While this is a micro-optimization the correct approach, that uses TryGetValue, is actually just as readable.

Bugs

#1902 A Stop and Start of the Bus causes a NullReferenceException inside event subscriptions

#1889 Timeout messages can incorrectly end up in error queue after Bus restart

When the bus is restarted using Bus.Start(), Bus.Shutdown() then Bus.Start() timeout messages can throw an exception and end up in the error queue.

If a saga message handler requests any timeouts, the message being handled is rolled back and always ends up in error queue.

#1888 Manual manipulating the Gateway Ack to be false will result in a true Ack

If a false is passed in the Ack header AutoAck will still be set to true

#1885 When self hosting messages are lost after IStartableBus.Shutdown() followed with IStartableBus.Start()

When self hosting, all messages are lost after restarting the bus (ie calling Shutdown followed by Start on IStartableBus.

Messages are removed from the queue but no handlers are called.

#1871 InMemory.Raise throws when using CastleWindsorBuilder

Due to the pipeline not wrapping InMemory.Raise in a child container an exception can be thrown

InvalidOperationException: Scope was not available. Did you forget to call container.BeginScope()?

#1478 Remove hard coded 20 sec limit on IWantToRunWhenBusStartsAndStops.Stop

In v4 IWantToRunWhenBusStartsAndStops.Stop is only allowed to run for a maximum of 20 seconds.

This limitation may not allow tasks to be completed successfully before shutting down the Windows service.

As such this timeout has been removed.

Where to get it

You can download this release from:

4.3.4

05 Feb 21:43
Compare
Choose a tag to compare

This release consist of these issues that were achieved through these commits.

Bugs

#1925 When using NServiceBus version 4.3.x and an event is sent through a Distributor it is incorrectly received by multiple workers instead of just one.

When using the distributor in version 4.3.x, and the workers are subscribing to an event, having the message mapping for the event in the app.config of the worker causes each worker to handle the event, instead of just one worker.

If you are affected by this bug:

  • Update your distributor/worker endpoints to the the 4.3.4 hotfix release.
  • Inspect the current subscription entries for the publisher. Remove any extra subscription entries that are already registered for the workers for the event.
  • Restart your endpoint.
How to delete your subscription entries when using RavenDB persistence:
1 Open the Raven Management Studio

Browse to your RavenDB url. if RavenDB is installed using the default ports the url is either http://servername:8080 or http://servername:8081, otherwise use the appropriate port number.

2 Find the correct database

Identify the database of the publisher endpoint (the database name matches the endpoint name) and double click to open the database.
image

3 Identify the subscription

You will see the subscriptions list. If there are multiple subscription documents, Identify the subscription document based on the event type. For example, Example.Messages.Events.MyEvent as specified in the MessageType column.
image

4 Delete the erroneous subscribers

Double click on the document to open the subscription list. Select the worker nodes that have been erroneously subscribed to the event and press delete.
image

Once the entries are removed, click on Save to save the document.
image

How to delete your subscription entries when using NHibernate persistence:
1 Find your Database in SQL Management Studio

Using Microsoft SQL Management Studio, connect to the appropriate persistence database specified in the NServiceBus/Persistence connection string in the app.config of the endpoint

<connectionStrings>
 <add name="NServiceBus/Persistence" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=NSERVICEBUS;Integrated Security=True" />
</connectionStrings>
2 Delete the erroneous subscribers

Find out the erroneous subscribers by running

select * 
    FROM [NServiceBus].[dbo].[Subscription]
    where TypeName='Example.Messages.Events.MyEvent'

To clear out the subscriptions for the event Example.Messages.Events.MyEvent, delete the subscription entries for the workers. For example:

delete
    FROM [NServiceBus].[dbo].[Subscription]
    where TypeName='Example.Messages.Events.MyEvent'
    and SubscriberEndpoint in ('Example.NServiceBus.Worker@machine1', 'Example.NServiceBus.Worker@machine2')

Where to get it

You can download this release from:

4.3.3

22 Jan 19:53
Compare
Choose a tag to compare

This release consist of these issues that were achieved through these commits.

Bugs

#1910 V4.3 subscribers fail to subscribe to V3.X publishers

Version 4.3.0 introduced a bug where the NServiceBus.Version header didn't get populated for the control messages containing the subscribe/unsubscribe requests. This meant that our mutators didn't mutate them correctly causing the requests to be misinterpreted.

Affected transports: Msmq, SqlServer

Repro

  • Clone this https://github.com/gbiellem/PubSubRepro
  • Set as startup MyPublisher (3.3.8), Subscriber1 (4.3) and Subscriber2 (4.3)
  • Start
  • Press Enter in the publisher
  • Message not received by subscribers

Content trimmed. See full issue

Where to get it

You can download this release from:

4.3.2

03 Jan 10:58
Compare
Choose a tag to compare

This release consist of these issues that were achieved through these commits.

Bugs

#1861 When using Azure ServiceBus, not passing in the endpoint address for subscriptions causes a null reference exception.

When we fixed issue #1837 in version 4.3.1, a check was added to ignore the address count and call the SubscriptionManager.Subscribe passing in null as the endpoint address for brokered transports with centralized pub sub support. While it works for ActiveMQ and RabbitMQ, the azure transport expects an address. Passing in null causes a NRE.

#1852 Read license from a version agnostic location, so that existing licenses need not be re-installed for newer releases

Our current way of handling licenses in the registry is wrong since it looks for a subkey containing the {major}.{minor}. This means that users that have installed a 4.2/4.3 license will have to reinstall it again for 4.4 even though the license it self is valid for 4.4

#1851 Bus failing to publish interface-defined event when messageConstructor not defined

When publishing using interface-defined events and when the messageConstructor not defined, an exception is thrown and the event is not published.

#1845 Remove Get-NServiceBusVersion commandlet

Get-NServiceBusVersion commandlet reported the version of NServiceBus.Powershell.dll and not the version of the NSB within the solution. NServiceBus.Powershell dll has been separated from the core in order that it could be released independantly of the core if need be. This commandlet does not make sense, as we can have multiple endpoints referencing different versions of NServiceBus on the same machine.

Where to get it

You can download this release from: