Skip to content

Commit

Permalink
Merge pull request #1 from ramonsmits/nservicebus7
Browse files Browse the repository at this point in the history
2.0.0-beta0001
  • Loading branch information
ramonsmits authored Nov 25, 2017
2 parents c513d42 + b9eae67 commit f010a4e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
# NServiceBus.RateLimiter

**For NServiceBus 6+**
Before NServiceBus 6 there was the ability to throttle the number of messages processed per second. This feature was deprecated because throttling can be conflicting with the different types of tranports and transaction modes. This package restores this functionality.


## Version compatibility

NServiceBus | NServiceBus.RateLimiter
------------|------------------------
v6.x | v1.x
v7.0 | v2.x

## Use cases

Rate limiting can be used to reduce the pressure on your infrastructure or the infrastructure of others. Lets assume you send out a mass mailing and you do not want to consume a lot of bandwidth or maybe you are calling into a third party services that doesn't allow more then 100 requests per second. Rate limiting can help to make the whole processing more efficient without triggering unneeded retry logic.

Before NServiceBus 6 there was the ability to throttle the number of messages processed per second. This feature was deprecated because throttling can be conflicting with the different types of tranports and the way messages are retrieved.

## Important

The packages registers itself in the first stage of the pipeline (`ITransportReceiveContext`) this means that when this behavior is called the message is actually already retrieved from the queue. If you use a transactional queue this means that your transport transaction duration will increase (MSMQ, SQL Server, etc.). If you use lease based transport (Azure Storage Queues).

For this reason a warning log entry is written is the delay takes more then 5 seconds.
Expand Down
12 changes: 6 additions & 6 deletions src/NServiceBus.RateLimiter/NServiceBus.RateLimiter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<PropertyGroup>
<!-- AssemblyFileVersionAttribute -->
<FileVersion>1.0.4</FileVersion>
<FileVersion>2.0.0</FileVersion>
<!-- AssemblyInformationalVersionAttribute -->
<Version>$(FileVersion)</Version>
<Version>$(FileVersion)-beta0001</Version>
<!-- AssemblyVersionAttribute -->
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<!-- Nuget -->
<PackageVersion>$(Version)</PackageVersion>
<TargetFramework>net452</TargetFramework>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<PackageId>NServiceBus.RateLimiter</PackageId>
<Authors>ramonsmits</Authors>
<Description>Rate Limiting NService Pipeline extension</Description>
Expand All @@ -26,13 +26,13 @@
<AssemblyOriginatorKeyFile>..\key.snk</AssemblyOriginatorKeyFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NServiceBus" Version="[6,7)" />
<PackageReference Include="NServiceBus" Version="[7.0.0-beta0012,8.0.0)" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using NServiceBus.Configuration.AdvanceExtensibility;
using NServiceBus.Configuration.AdvancedExtensibility;

namespace NServiceBus
{
Expand Down

0 comments on commit f010a4e

Please sign in to comment.