Path: redb-route/CONTRIBUTING.md Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route Page: https://redbase.app/src/dev-2026-12-06/redb-route/CONTRIBUTING.md ---- # Contributing to redb.Route Thank you for your interest in redb.Route! ## How to Contribute ### Reporting Issues - Use [GitHub Issues](https://github.com/redbase-app/redb-route/issues) for bug reports - Use [GitHub Discussions](https://github.com/redbase-app/redb-route/discussions) for questions and feature requests ### Bug Reports Please include: - Package name and version (e.g. `redb.Route.Kafka 1.0.0-preview.1`) - .NET version - Transport / broker version where applicable (e.g. Kafka 3.6, RabbitMQ 3.13) - Minimal route definition to reproduce the issue - Expected vs actual behavior (including exception message and stack trace if any) ### Feature Requests Open a [Discussion](https://github.com/redbase-app/redb-route/discussions/categories/ideas) with: - Description of the feature - Use case / motivation - Example code showing the desired DSL or API (if applicable) ## Code Contributions ### Scope This repository contains the full source of redb.Route — the core engine, all transports, and adapter packages. Pull requests for bug fixes, documentation improvements, and new transport connectors are welcome. ### Getting Started 1. Fork the repository 2. Create a branch: `git checkout -b fix/kafka-ack-handling` 3. Make your changes (see guidelines below) 4. Run existing tests if you have access to the required brokers 5. Submit a Pull Request with a clear description ### Code Guidelines - Follow the existing code style — C# 12, `nullable enable`, `implicit usings` - Use English for all code identifiers, XML doc summaries, and error messages - Add `/// ` for all new public classes and methods - Do not use `dynamic` — prefer concrete types and strong typing - Use LINQ where appropriate; avoid unnecessary nested loops - Every new transport must implement `IComponent` and register a URI scheme - Every new transport must have a fluent builder with `implicit operator string` - New processors must implement `IProcessor` or `IAsyncProcessor` - Do not suppress `CS1591` — every public member must have XML documentation ### New Transport Checklist Registration and API: - [ ] Implements `IComponent` and registers URI scheme - [ ] Has a fluent builder class (e.g. `MyTransportBuilder`) with `implicit operator string` - [ ] Registered via `AddRedbRouteXxx()` extension on `IServiceCollection` Options and connections: - [ ] Options class inherits from `EndpointOptions` (or is standalone with XML docs), binds strictly, and `Validate()` fails with errors that name the option - [ ] Every secret is marked `[Sensitive]`; connection options carry `[ConnectionParameter]` / `[ConnectionFactoryReference]`; options that apply to one side only carry `[EndpointRole]` - [ ] A connection factory can be registered by name and referenced from the endpoint URI Lifecycle: - [ ] A polling or pull consumer derives from `DrainableConsumer`; a callback consumer uses `InflightDrainGuard` and says why - [ ] `Start` throws when the broker cannot be reached, so the route's start retry takes over - [ ] A connection lost while the route runs is re-established with back-off; the endpoint reports the outage through its health (`TransportCondition`), with one log line on loss and one on recovery - [ ] Stop drains in-flight messages within the shutdown timeout; what is still unsettled goes back to the broker, never acknowledged - [ ] The producer derives from `ConnectableProducer` and reconnects on the next send after a loss - [ ] Connections are released in `DisposeAsync` Delivery: - [ ] `ackMode` (`manual` by default, `auto`) where the protocol settles per message, or the README says why not - [ ] A failed message is redelivered in a way the broker counts; poison messages are bounded (broker counter and dead letter, or a connector option) and the default is documented - [ ] Sends inside a transacted route are deferred through `TransactedActions.Defers` with a `transacted` option; no exactly-once claim unless the broker commits output and input together - [ ] Concurrency through `ConcurrencyOption` (accepts `auto`); in-flight bounded by the protocol's credit; batch mode through `BatchDispatcher` where the protocol receives in batches; the ordering guarantee is written down per mode Headers and telemetry: - [ ] Headers use a consistent `redbXxx.` prefix, declared in one class, and pass through an `IHeaderFilterStrategy` - [ ] Trace context is injected on send and extracted on receive - [ ] Transport spans through `RouteTelemetryExtensions`; failures through `RecordFailure`; the endpoint's BytesOut is recorded; `RecordError` is given the exception Tests and docs: - [ ] Unit tests run without a broker; integration tests run against the broker in a container on `net10.0` and `net11.0` - [ ] Tests cover broker down at start, broker restarted while running, stop with messages in flight, failure then redelivery, poison to dead letter, `ackMode=auto`, transacted commit and rollback, header round trip and the concurrency bound, or say why an item does not apply - [ ] Has a `README.md` with NuGet badge, Installation, Usage, options, the delivery guarantee, Fluent Builder API table, and "Part of" footer - [ ] The scheme is listed in [CONNECTORS_ROADMAP.md](CONNECTORS_ROADMAP.md) - [ ] A changelog entry describes the change for users ### Commit Messages Use the format: `type(scope): description` Examples: - `fix(kafka): handle null message key in consumer` - `feat(s3): add server-side encryption options` - `docs(http): document named URL parameter binding` ## License By contributing, you agree that your contributions will be licensed under the [Apache License 2.0](LICENSE).