Skip to content

Releases: judwhite/NsqSharp

NsqSharp 0.5.4

05 Oct 05:51
Compare
Choose a tag to compare

New features:

  • Add TLS support for Producers and Consumers. See example.
  • Add AutofacObjectBuilder convenience class; tested against Autofac 3.5.2. Supported in .NET 4.0 and higher. See example.

Fixed issues:

  • Fix race conditions in Producer and Consumer when nsqd connectivity lost; see #36.
  • If message Attempt > MaxAttempts try to get the resolved handler type and deserialized message body to send to MessageAuditor; mirrors behavior if Attempt <= MaxAttempts (see change).

Other:

  • Consumer: Remove internal class ApiRequest for querying nsqlookupd, replace with public class NsqLookupdHttpClient.
  • Config: Change default TCP WriteTimeout from 1s to 10s to maintain connectivity in higher latency scenarios; affects Producers and Consumers using default Config.WriteTimeout.
  • More helpful error messages when connecting to the wrong nsqd or nsqlookupd port.
  • Add strong name to NsqSharp.dll (thanks @crazybert).

NsqSharp 0.5.3

19 Aug 05:17
Compare
Choose a tag to compare

New features:

  • Consumer: Add functionality to redistribute RDY count to nsqd nodes with messages when one or more nodes is idle greater than Config.LowRdyIdleTimeout. Enables better utilization of Consumer processing when one or more nsqd nodes is idle for a given topic. Example: if nsqd-1 has 100,000 messages and nsqd-2 has 0, more of the RDY count will be given to nsqd-1 instead of the normal even distribution across connections.
  • Add Config.RDYRedistributeOnIdle to enable above behavior. Default = false.

Fixed issues:

  • Fix Conn.LastMessageTime calculation.

NsqSharp 0.5.2

12 Aug 13:24
Compare
Choose a tag to compare

New Features:

  • Connection timeout to nsqlookupd changed to 2 seconds or Config.DialTimeout, whichever is greater

See notes in 0.5.1-beta1 and 0.5.0-beta1 for changes since 0.4.0.

NsqSharp 0.5.1-beta1

09 Aug 07:27
Compare
Choose a tag to compare
NsqSharp 0.5.1-beta1 Pre-release
Pre-release

New features:

  • Add INsqdPublisher interface to control publishing on the bus
  • Add NsqdHttpPublisher and NsqdTcpPublisher built-in implementations of INsqdPublisher
  • BusConfiguration:
    • Add optional bool logOnProcessCrash parameter to constructor (default is true); closes #22
    • Add optional INsqdPublisher parameter to constructor (default is NsqdTcpPublisher)
  • Producer: Set id to sequential instance count, used in logging (feature has existed in Consumer)

Breaking changes (and some new features):

  • BusConfiguration:
    • Change defaultConsumerNsqConfig parameter name to nsqConfig in constructor (affects Consumer same as before; now also affects Producer if NsqdTcpPublisher used)
  • Default publish method (when calling bus.Send) changed from HTTP to TCP
  • Remove static class NsqdHttpApi, replaced with NsqdHttpClient and NsqlookupdHttpClient
  • Consumer, Producer, and Chan<T> classes sealed

Bug fixes:

  • Remove /ping check at bus start; closes #23

NsqSharp 0.5.0-beta1

18 Jul 22:04
Compare
Choose a tag to compare
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".

NsqSharp 0.4.0

14 Apr 11:17
Compare
Choose a tag to compare

New features:

  • Add IMessageTopicRouter for message topic routing based on message data
  • Add IMessageMutator for modifying a message before it's sent
  • Add DialTimeout to Config, deadline for establishing TCP connections

NsqSharp 0.3.4

12 Apr 11:09
Compare
Choose a tag to compare

This release is in sync with go-nsq 1.0.4.

New features:

  • Add pluggable Consumer BackoffStrategy; add full-jitter strategy (thanks @hden)
  • Allow BackoffStrategy to be set via flag (thanks @twmb)
  • Enable Producer PublishAsync and MultiPublishAsync

Fixed issues:

  • TCP Connection reading incomplete messages
  • ErrNotConnected race during Producer connection (thanks @jeddenlea)
  • RDY redistribution after backoff with no connections
  • Backoff stall when using RequeueWithoutBackoff
  • Handling of connection closing when resuming after backoff (thanks @jnewmano)

NsqSharp 0.3.3

01 Apr 06:58
Compare
Choose a tag to compare

Behavior changes:

  • IMessageInformation.HandlerType now returns the resolved type instead of the registered interface type.

NsqSharp 0.3.2

27 Mar 11:04
Compare
Choose a tag to compare

New features:

  • Added IBus.GetCurrentMessageInformation method to get current message topic, channel, unique id; #16
  • NsqdHttpApi Stats method now deserializes e2e_processing_latency on channels; #2

Behavior changes:

  • IBus.CurrentMessage now returns null if the current thread isn't associated with a message handler (previous behavior was to throw KeyNotFoundException); #15
  • IBus.SendMulti and NsqdHttpApi.PublishMultiple won't send requests if message count is 0; #12, #13

NsqSharp 0.3.1

23 Mar 21:18
Compare
Choose a tag to compare

New features:

  • NsqdHttpApi.Stats returns deserialized object model instead of JSON string
  • Allow registering IHandleMessages<> interfaces as handlers to be resolved by DI container (support one concrete class handling multiple messages)
  • Improve exception messages for missing channel/topic registrations and handler configuration
  • Add BackoffTriggered (bool) and RequeuedUntil (DateTime?) properties to Message and IMessageInformation for auditing
  • Add convenience classes to the NsqSharp.Bus.BuiltIn namespace: HandlerTypeToChannelDictionary and MessageTypeToTopicDictionary
  • Add support for unit testing with BusService.Start
  • Add .NET 3.5 support
  • NuGet Packages for .NET 4.5.2, 4.5.1, 4.5, 4.0, and 3.5

Fixed issues:

  • Fixed issue with Producer locking when exception thrown during initial nsqd Connect

Signature changes:

  • IObjectBuilder: Add "where T : class" on Inject method
  • NsqdHttpApi.Stats returns NsqdStats instead of string
  • IFailedMessageInformation: FailedException property renamed to Exception
  • BusConfiguration: Constructor parameter 'defaultNsqlookupdHttpEndpoints' renamed to 'defaultNsqLookupdHttpEndpoints'