Foundatio.AzureServiceBus
Foundatio Azure ServiceBus
Install / Use
/learn @FoundatioFx/Foundatio.AzureServiceBusREADME
Pluggable foundation blocks for building loosely coupled distributed apps.
✨ Why Choose Foundatio?
- 🔌 Pluggable implementations - Swap Redis, Azure, AWS, or in-memory with no code changes
- 🧪 Developer friendly - In-memory implementations for fast local development and testing
- 💉 DI native - Built for Microsoft.Extensions.DependencyInjection
- 🎯 Interface-first - Code against abstractions, not implementations
- ⚡ Production ready - Battle-tested in high-scale applications
- 🔄 Consistent APIs - Same patterns across caching, queues, storage, and more
🧱 Core Building Blocks
| Feature | Description | |---------|-------------| | Caching | In-memory, Redis, and hybrid caching with automatic invalidation | | Queues | Reliable message queuing with Redis, Azure, AWS SQS | | Locks | Distributed locking and throttling | | Messaging | Pub/sub with Redis, RabbitMQ, Kafka, Azure Service Bus | | Jobs | Background job processing with queue integration | | File Storage | Unified file API for disk, S3, Azure Blob, and more | | Resilience | Retry policies, circuit breakers, and timeouts |
🚀 Quick Start
dotnet add package Foundatio.AzureServiceBus
// Queuing
IQueue<WorkItem> queue = new AzureServiceBusQueue<WorkItem>(o => o
.ConnectionString("Endpoint=sb://..."));
await queue.EnqueueAsync(new WorkItem { Data = "Hello" });
var entry = await queue.DequeueAsync();
// Messaging
IMessageBus messageBus = new AzureServiceBusMessageBus(o => o
.ConnectionString("Endpoint=sb://..."));
await messageBus.PublishAsync(new MyMessage { Data = "Hello" });
📦 Provider Implementations
| Provider | Caching | Queues | Messaging | Storage | Locks | |----------|---------|--------|-----------|---------|-------| | In-Memory | ✅ | ✅ | ✅ | ✅ | ✅ | | Redis | ✅ | ✅ | ✅ | ✅ | ✅ | | Azure Storage | | ✅ | | ✅ | | | Azure Service Bus | | ✅ | ✅ | | | | AWS (S3/SQS/SNS) | | ✅ | ✅ | ✅ | | | RabbitMQ | | | ✅ | | | | Kafka | | | ✅ | | | | Minio | | | | ✅ | | | Aliyun | | | | ✅ | | | SFTP | | | | ✅ | |
📚 Learn More
Core Features
- Getting Started - Installation and setup
- Caching - In-memory, Redis, and hybrid caching with invalidation
- Queues - FIFO message delivery with lock renewal and retry policies
- Locks - Distributed locking with null handling patterns
- Messaging - Pub/sub with size limits and notification patterns
- File Storage - Unified file API across providers
- Jobs - Background job processing and hosted service integration
Advanced Topics
- Resilience - Retry policies, circuit breakers, and timeouts
- Serialization - Serializer configuration and performance
- Dependency Injection - DI setup and patterns
- Configuration - Options and settings
📦 CI Packages (Feedz)
Want the latest CI build before it hits NuGet? Add the Feedz source and install the pre-release version:
dotnet nuget add source https://f.feedz.io/foundatio/foundatio/nuget -n foundatio-feedz
dotnet add package Foundatio.AzureServiceBus --prerelease
Or add to your NuGet.config:
<configuration>
<packageSources>
<add key="foundatio-feedz" value="https://f.feedz.io/foundatio/foundatio/nuget" />
</packageSources>
<packageSourceMapping>
<packageSource key="foundatio-feedz">
<package pattern="Foundatio.*" />
</packageSource>
</packageSourceMapping>
</configuration>
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. See our documentation for development guidelines.
Development Setup:
- Clone the repository
- Open
Foundatio.AzureServiceBus.slnxin Visual Studio or VS Code - Run
dotnet buildto build - Run
dotnet testto run tests
📄 License
Apache 2.0 License
Thanks to all the people who have contributed
Related Skills
node-connect
348.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
348.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
348.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
