NsqSharp 0.5.0-beta1
Pre-release
Pre-release
New features:
- Improved TCP read performance.
- Reduced number of unnecessary ChannelClosedException's thrown by timeout threads.
- Preliminary support for hosting in IIS/WinForms/WPF (untested).
Breaking changes (and some new features):
- Consumer
- Removed StopChan public property. Consumer.Stop is now always a blocking call with no parameters.
- For non-blocking stop and wait use Consumer.StopAsync and await the returned Task; alternatively you can call Consumer.Wait for to block until the Consumer is stopped. The Wait method has the advantage that it can be called before StopAsync is called and without knowing the returned Task.
- Producer
- PublishAsync and MultiPublishAsync now return a Task<ProducerResponse> which can be awaited.
- Renamed class ProducerTransaction to ProducerResponse to avoid Chan<ProducerTransaction> from unintentionally being passed into params object[] args in PublishAsync and MultiPublishAsync ("doneChan" argument removed from signatures).
- IBus
- CurrentMessage renamed to CurrentThreadMessage (indicates the property is ThreadStatic); return type changed to IMessage.
- GetCurrentMessageInformation() renamed GetCurrentThreadMessageInformation() (indicates the method is ThreadStatic).
- IMessage
- IMessage interface added; closes #20 "Make IBus.CurrentThreadMessage mockable".
- Message class is now sealed, implements IMessage.
- IHandler interface methods use IMessage for method arguments instead of Message.
- ICurrentMessageInformation and IMessageInformation expose Message property as IMessage instead of Message.
Bug Fixes:
- Consumer: Update Exponential/FullJitter Backoff Strategy to not bound by MaxBackoffDuration
- Responsibility has been moved to Consumer startStopContinueBackoff.
- Prevents backoffCounter from incrementing beyond when backoffDuration reaches MaxBackoffDuration.
- Prevents a high number of backoffCounter values to decrement given a prolonged failure of messages.
- BusConfiguration AddMessageHandler now correctly passes typeof(TMessage) instead of typeof(Message).
- FullJitterStrategy: protect against calling rng.Intn with 0; may resolve #21 "Unhandled ArgumentOutOfRangeException".