https://github.com/shuttle/shuttle.esb.throttle
The Throttle extension aborts pipeline processing when the CPU usage exceeds given percentage.
https://github.com/shuttle/shuttle.esb.throttle
Last synced: 24 days ago
JSON representation
The Throttle extension aborts pipeline processing when the CPU usage exceeds given percentage.
- Host: GitHub
- URL: https://github.com/shuttle/shuttle.esb.throttle
- Owner: Shuttle
- License: bsd-3-clause
- Created: 2024-02-08T16:11:16.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-03-02T14:12:32.000Z (about 1 year ago)
- Last Synced: 2025-03-23T22:14:18.207Z (12 months ago)
- Language: C#
- Size: 38.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Throttle
```
PM> Install-Package Shuttle.Esb.Throttle
```
The Throttle module for Shuttle.Esb aborts pipeline processing when the CPU usage exceeds given percentage.
The module will attach the `ThrottleObserver` to the `OnPipelineStarting` event of the `InboxMessagePipeline` and abort the pipeline if the CPU usage exceeds the given percentage.
## Configuration
```c#
services.AddThrottle(builder =>
{
builder.Options.CpuUsagePercentage = 65;
builder.Options.AbortCycleCount = 5;
builder.Options.DurationToSleepOnAbort = new List { TimeSpan.FromSeconds(1) };
})
```
## Options
| Option | Default | Description |
| --- | --- | --- |
| `CpuUsagePercentage` | 65 | The CPU usage percentage threshold to start throttling. |
| `AbortCycleCount` | 5 | The number of times a pipeline will be aborted before running at least once. |
| `DurationToSleepOnAbort` | "00:00:01" | The duration(s) to sleep when aborting a pipeline. Can be incremented for each abort. |