5.1.0
As part of this release we had 159 commits which resulted in 44 issues being closed.
Features
#2473 Adding a new Rx BusNotifications API
Streams added in this release:
MessageHasFailedAFirstLevelRetryAttempt
MessageHasBeenSentToSecondLevelRetries
MessageSentToErrorQueue
#2103 Expose a way to set TTRQ for MSMQ
Msmq in workgroup mode requires TTRQ to be set when sending.
http://serverfault.com/questions/480285/how-to-change-default-msmq-time-to-reach-queue-time
Exposed a key on the connection string ...;TimeToReachQueue=12:00:00;
where the value is a parsable timespan.
#1235 Prevent saga id from being changed
If a modification of the Saga Id then an exception will be thrown
A modification of IContainSagaData.Id has been detected. This property is for infrastructure purposes only and should not be modified. SagaType: TheSagaType
#1228 Make the timeouts for our circuit breakers configurable
Improvements
#2502 Remove redundant new() constraint from Saga.RequestTimeout
Since an instance is being passed in then there is no need for a new()
constraint
RequestTimeout<TTimeoutMessageType>(DateTime at, TTimeoutMessageType timeoutMessage)
RequestTimeout<TTimeoutMessageType>(TimeSpan within, TTimeoutMessageType timeoutMessage)
#2491 Obsolete Saga.RequestTimeout(Action)
Both have new()
constraints and hence cannot be an interface. No need to construct an instance when the consumer can do this themselves.
RequestTimeout<TTimeoutMessageType>(TimeSpan within, Action<TTimeoutMessageType> messageConstructor) where TTimeoutMessageType : new()
RequestTimeout<TTimeoutMessageType>(DateTime at, Action<TTimeoutMessageType> action) where TTimeoutMessageType : new()
#2487 improve performance of InMemoryTimeoutPersister
An ~4x improvement in the performance of InMemoryTimeoutPersister
#2480 Change callback so they fire on replies only
#2474 Performance counter can hang
Now doing the performance counter check (counter.CounterType
) in a time-bombed thread that if it doesn't return within 2 seconds we mark the counter as not "healthy".
#2457 Removed all the host related projects
As of 5.1 the Host will be on a seprarate repo/release cycle
#2447 Use Exception.ToString in headers
Store Exception.ToString()
instead of Exception.StackTrace
inside the NServiceBus.ExceptionInfo.StackTrace
header
#2439 Remove Add-BindingRedirect from nuget install
Not needed since we are locking assembly version number to major
#2431 Remove the logging from init.ps1
It creates noise in the package manager console
#2413 Should throw an error Definition does not have a public empty constructor
For Transport, Logging and Persistence definitions.
#2367 Persistence no longer required for SendOnly endpoints
#2286 InMemorySagaPersister should use a concurrent dictionary
#2056 Handle ReflectionTypeLoadException better (included successfully loaded types)
Bugs
#2507 DataBus is looking for FileShareDatabusPath when it should not
#2501 passing null messageConstructor parameter to ReplyToOriginator will result in a null message being sent
ReplyToOriginator<TMessage>(Action<TMessage> messageConstructor)
incorrectly did a null parameter check whichc resulted in a null being passed ass a message.
#2464 Impossible to register a custom IMessageSerializer
Now support two possible was to register a custom serializer.
A user can either config.UseSerialization(type of definition)
or config.UseSerialization(type of serializerImplementation)
#2463 Throw from NServiceBus.MsmqUtilities.Convert will result in message loss
Fixed so when NServiceBus.MsmqUtilities.Convert
throws the message will be sent to the error queue
#2407 FeatureStartupTasks are stopped too late
#2384 If handler throws a SerializationException then retries are ignored
#2352 Throw better exception when endpoint name maxes out endpoint name can max out PerformanceCounters
#2094 Incorrect logging when Retries are disabled
#2047 PerformanceCounters causes indefinite hang on bus start
#2031 Fall back to using WindowsIdentity.GetCurrent when IIS is impersonating
if Thread.CurrentPrincipal.Identity
is null (which can happen in IIS impersonation) fall back to using WindowsIdentity.GetCurrent()
instead of Thread.CurrentPrincipal.Identity
#2030 Add null Principal checks to WindowsIdentityEnricher
Thread.CurrentPrincipal
is now checked for null
#1976 IBus.OutgoingHeaders updates can cause InvalidOperationException
Change IBus.OutgoingHeaders
to a ConcurrentDictionary
#529 Headers set in handler should be visible to downstream handlers
Where to get it
You can download this release from nuget