NServiceBus.Compression
4.0.0
See the version list below for details.
dotnet add package NServiceBus.Compression --version 4.0.0
NuGet\Install-Package NServiceBus.Compression -Version 4.0.0
<PackageReference Include="NServiceBus.Compression" Version="4.0.0" />
paket add NServiceBus.Compression --version 4.0.0
#r "nuget: NServiceBus.Compression, 4.0.0"
// Install NServiceBus.Compression as a Cake Addin #addin nuget:?package=NServiceBus.Compression&version=4.0.0 // Install NServiceBus.Compression as a Cake Tool #tool nuget:?package=NServiceBus.Compression&version=4.0.0
NServiceBus.Compression
Adds message body compression to the NSericeBus pipeline.
Version compatibility
NServiceBus | NServiceBus.Compression |
---|---|
v5.x | v1.x |
v6.x | v2.x |
v7.x | v3.x |
v8.x | v4.x |
Please note that there might be versions targeting other NServiceBus versions. Please check the Releases for all versions. or check the root of the master
branch of the repository.
Introduction
This package is based on the mutator example from the NServiceBus documentation website but is has these additional features:
- Drop in auto enable compresssion, no need to recompile! Can be saviour if affected by production incidents due to unable to send too large messages.
- Requires messages to be of a minimal size but this thresshold is configurable.
- Compression level can be configured to have more flexibility between CPU cycles and message size.
- Uses a header similar as the http specification
Content-Encoding
.
Configuration
The defaults are:
- Size treshold: 1,000 bytes
- Compression level: Fastest
This is to not spend CPU cycles on messages that are small. Compression not only costs CPU cycles but also introduces latency both during outgoing (compression) and incoming (decompression) messages.
The following only compresses messages over 16KB in size and uses the highest compression level.
endpointConfiguration.CompressMessageBody(System.IO.Compression.CompressionLevel.Optimal, 16 * 1024);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- CommunityToolkit.HighPerformance (>= 8.0.0)
- NServiceBus (>= 8.0.1 && < 9.0.0)
-
net6.0
- CommunityToolkit.HighPerformance (>= 8.0.0)
- NServiceBus (>= 8.0.1 && < 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.