github Particular/NServiceBus 4.4.0

latest releases: 9.0.0, 8.2.0, 9.0.0-alpha.10...
10 years ago

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:

Don't miss a new NServiceBus release

NewReleases is sending notifications on new releases.