How codewithmecoder/fluxorbus works
FluxorBus is an in-process .NET message bus. A producer publishes a message through the bus into a bounded channel; a hosted consumer drains it and dispatches regular messages to handlers, optionally accumulating batch messages for batch handlers. Pipeline behaviors wrap regular handler calls, while DI configures the runtime and an optional source generator registers attributed handlers. Edges are limited to relationships shown in the README or SOURCE INDEX; several implementation details, including the generator’s registration output and batch executor internals, were not excerpted.
Main entry points: ServiceCollectionExtensions.cs DI registration · MessageConsumer.cs Background consumer · OrderCreated.cs Order created event · ChannelMessageBus.cs Channel bus
Components 23
Message contracts
- Message contract
src/FluxorBus.Abstractions/IMessage.cs - Batch message contract
src/FluxorBus.Abstractions/IMessageBatch.cs - Handler contract
src/FluxorBus.Abstractions/IMessageHandler.cs - Batch handler contract
src/FluxorBus.Abstractions/IMessageBatchHandler.cs - Bus contract
src/FluxorBus.Abstractions/IMessageBus.cs - Pipeline contract
src/FluxorBus.Abstractions/IPipelineBehavior.cs - Order created event
samples/FluxorBus.SampleApi/Features/Orders/OrderCreated.cs - Order handler
samples/FluxorBus.SampleApi/Features/Orders/OrderCreatedHandler.cs - Email handler
samples/FluxorBus.SampleApi/Features/Orders/SendEmailOnOrderCreated.cs - Order batch event
samples/FluxorBus.SampleApi/Features/Orders/OrderCreatedBatch.cs
Transport and dispatch
- Channel bus
src/FluxorBus.Core/Channel/ChannelMessageBus.cs - Background consumer
src/FluxorBus.Core/Channel/MessageConsumer.cs - Message executor
src/FluxorBus.Core/Execution/MessageExecutor.cs - Batch executor
src/FluxorBus.Core/Execution/MessageBatchExecutor.cs
Pipeline behaviors
- Retry behavior
src/FluxorBus.Pipeline/RetryBehavior.cs - Circuit breaker
src/FluxorBus.Pipeline/CircuitBreakerBehavior.cs - Metrics behavior
src/FluxorBus.Pipeline/MetricsBehavior.cs
Registration and generation
- Bus options
src/FluxorBus.Core/FluxorBusOptions.cs - DI registration
src/FluxorBus.DependencyInjection/ServiceCollectionExtensions.cs - Handler generator
src/FluxorBus.SourceGen/FluxorBusGenerator.cs - Handler attribute
src/FluxorBus.SourceGen/MessageHandlerAttribute.cs
Other components
- Publisher
- Orders controller
samples/FluxorBus.SampleApi/Controllers/OrdersController.cs
Connections 34
- Publisher → Orders controller: invokes
README.md - Orders controller → Bus contract: publishes through
README.md - Orders controller → Order created event: creates
README.md - Order created event → Message contract: implements
README.md - Bus contract → Channel bus: implemented by
src/FluxorBus.Core/Channel/ChannelMessageBus.cs - Channel bus → Bus options: uses capacity
src/FluxorBus.Core/Channel/ChannelMessageBus.cs - Channel bus → Background consumer: drained by
src/FluxorBus.Core/Channel/MessageConsumer.cs - Background consumer → Message executor: dispatches regular
src/FluxorBus.Core/Channel/MessageConsumer.cs - Background consumer → Batch executor: dispatches batches
src/FluxorBus.Core/Channel/MessageConsumer.cs - Background consumer → Bus options: reads batch settings
src/FluxorBus.Core/Channel/MessageConsumer.cs - Message executor → Handler contract: resolves handlers
src/FluxorBus.Core/Execution/MessageExecutor.cs - Message executor → Pipeline contract: invokes behaviors
src/FluxorBus.Core/Execution/MessageExecutor.cs - Batch executor → Batch handler contract: resolves handlers
src/FluxorBus.Core/Execution/MessageBatchExecutor.cs - Batch message contract → Message contract: extends
src/FluxorBus.Abstractions/IMessageBatch.cs - Batch handler contract → Batch message contract: handles
src/FluxorBus.Abstractions/IMessageBatchHandler.cs - Order handler → Handler contract: implements
README.md - Email handler → Handler contract: implements
README.md - Order created event → Order handler: handled by
README.md - Order created event → Email handler: also handled by
README.md - DI registration → Channel bus: registers
src/FluxorBus.DependencyInjection/ServiceCollectionExtensions.cs - DI registration → Background consumer: hosts
src/FluxorBus.DependencyInjection/ServiceCollectionExtensions.cs - DI registration → Message executor: registers
src/FluxorBus.DependencyInjection/ServiceCollectionExtensions.cs - DI registration → Batch executor: registers
src/FluxorBus.DependencyInjection/ServiceCollectionExtensions.cs - DI registration → Bus options: configures
src/FluxorBus.DependencyInjection/ServiceCollectionExtensions.cs - DI registration → Retry behavior: registers
src/FluxorBus.DependencyInjection/ServiceCollectionExtensions.cs - DI registration → Circuit breaker: registers
src/FluxorBus.DependencyInjection/ServiceCollectionExtensions.cs - DI registration → Metrics behavior: registers
src/FluxorBus.DependencyInjection/ServiceCollectionExtensions.cs - Retry behavior → Pipeline contract: implements
src/FluxorBus.DependencyInjection/ServiceCollectionExtensions.cs - Circuit breaker → Pipeline contract: implements
src/FluxorBus.Pipeline/CircuitBreakerBehavior.cs - Metrics behavior → Pipeline contract: implements
src/FluxorBus.Pipeline/MetricsBehavior.cs - Handler attribute → Handler generator: marks handlers for
README.md - Handler generator → Handler contract: discovers implementations
src/FluxorBus.SourceGen/FluxorBusGenerator.cs - DI registration → Handler generator: pairs with generated registration
README.md - Order batch event → Batch message contract: opts into batching
README.md