Skip to content

Remove the unused TRouteOptions type parameter from transport builders #620

Closed

Description

@thomhurst

Summary

Every transport builder carries three type parameters, TransportBuilder<TTransportOptions, TRouteOptions, TConsumerOptions>, but no transport defines any route option: all ten route option classes are empty. The extra parameter lengthens every signature and error message for no benefit.

Evidence

Empty declarations: KafkaRouteOptions, ServiceBusRouteOptions, AmazonSqsRouteOptions, AmazonSnsRouteOptions, RabbitMqRouteOptions, RabbitMqStreamsRouteOptions, NatsRouteOptions, GooglePubSubRouteOptions, PostgreSqlLocalRouteOptions, InMemoryRouteOptions (all public sealed class XRouteOptions;).

Related naming overlap: RouteBuilder.Options (the empty type), RouteBuilder.SendOptions (SendRouteOptions), TransportBuilder.SendDefaults and the per-send SendOptions.

Proposal

Drop TRouteOptions and the empty classes while breaking changes are still allowed. Expose transport-specific route settings as extension methods on the route builder when one is first needed.

Found by reading the code at 02fe06f; not reproduced at runtime unless stated.

Acceptance criteria

  • Remove the unused route-options parameter and empty route-options classes from the declaration/building APIs and all transport registrations; retain portable SendRouteOptions and native configuration pass-through.
  • Update generated call sites, samples and website API examples together; cover representative send, request and consumer declarations with the reduced generic surface.
  • Preserve startup validation, native routing and steady-state pipeline behavior. Record any design-record updates required by the changed public signatures.

Activity

  1. added
    enhancement
    area: core
    P3
    on Nov 13, 2026
  2. thomhurst commented on Nov 13, 2026

    @thomhurst
    OwnerAuthor

    Confirmed all ten route-options classes remain empty at origin/main 0b2617b. Added acceptance criteria covering all registrations and public call sites; this remains actionable API cleanup.

  3. added
    in-progress
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3area: coreenhancementin-progress

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions