Releases: judwhite/NsqSharp
Releases · judwhite/NsqSharp
NsqSharp 0.5.4
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 classNsqLookupdHttpClient
. - 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
New features:
- Consumer: Add functionality to redistribute
RDY
count to nsqd nodes with messages when one or more nodes is idle greater thanConfig.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 theRDY
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
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
New features:
- Add
INsqdPublisher
interface to control publishing on the bus - Add
NsqdHttpPublisher
andNsqdTcpPublisher
built-in implementations ofINsqdPublisher
BusConfiguration:
- Add optional
bool logOnProcessCrash
parameter to constructor (default istrue
); closes #22 - Add optional
INsqdPublisher
parameter to constructor (default isNsqdTcpPublisher
)
- Add optional
Producer
: Setid
to sequential instance count, used in logging (feature has existed inConsumer
)
Breaking changes (and some new features):
BusConfiguration:
- Change
defaultConsumerNsqConfig
parameter name tonsqConfig
in constructor (affectsConsumer
same as before; now also affectsProducer
ifNsqdTcpPublisher
used)
- Change
- Default publish method (when calling
bus.Send
) changed from HTTP to TCP - Remove static class
NsqdHttpApi
, replaced withNsqdHttpClient
andNsqlookupdHttpClient
Consumer
,Producer
, andChan<T>
classes sealed
Bug fixes:
- Remove /ping check at bus start; closes #23
NsqSharp 0.5.0-beta1
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
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
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
Behavior changes:
- IMessageInformation.HandlerType now returns the resolved type instead of the registered interface type.
NsqSharp 0.3.2
NsqSharp 0.3.1
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'