Skip to content

feat(mediator): generate Rebus owner routing - #759

Merged
AndreaCuneo merged 3 commits into
masterfrom
copilot/review-mediator-framework-implementation
Jul 15, 2026
Merged

feat(mediator): generate Rebus owner routing#759
AndreaCuneo merged 3 commits into
masterfrom
copilot/review-mediator-framework-implementation

Conversation

Copilot AI commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Implements the next planned mediator-framework task, T11.4: generate Rebus owner routing from message contracts instead of maintaining manual type maps.

  • Contract metadata

    • Add optional OwnerQueue to RebusMessageAttribute.
    • Validate blank queues and conflicting declarations via generator diagnostics.
  • Generated routing

    • Emit ConfigureArkRebusRouting.
    • Register owned messages through Rebus TypeBased().Map<TMessage>(queue) routing.
[RebusMessage(OwnerQueue = "ark.mediator.sample")]
public sealed record CompleteGreetingCompositionRequest
    : IRequest<GreetingResponse>;
  • Sample and documentation
    • Wire the sample composition root to generated routing.
    • Add generator coverage for routing, invalid queues, and conflicts.
    • Update the mediator implementation plan and task order.

Copilot AI and others added 2 commits July 15, 2026 12:59
Co-authored-by: AndreaCuneo <5227688+AndreaCuneo@users.noreply.github.com>
Co-authored-by: AndreaCuneo <5227688+AndreaCuneo@users.noreply.github.com>
/// Opt-in declaration that exposes a pure <c>Ark.Tools.Solid</c> request as a Rebus message.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RebusMessage cannot be applied multiple times Owner Queue must be unique unique

@AndreaCuneo

Copy link
Copy Markdown
Contributor

@copilot resolve open comments

Co-authored-by: AndreaCuneo <5227688+AndreaCuneo@users.noreply.github.com>

Copilot AI commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve open comments

Resolved in commit f01c5fb: RebusMessageAttribute now allows only one declaration, and generator conflict handling/tests were removed accordingly. Targeted and full solution tests pass.

Copilot AI requested a review from AndreaCuneo July 15, 2026 13:36
@AndreaCuneo
AndreaCuneo marked this pull request as ready for review July 15, 2026 15:25
@AndreaCuneo
AndreaCuneo requested a review from a team as a code owner July 15, 2026 15:25
@AndreaCuneo
AndreaCuneo merged commit a62b34d into master Jul 15, 2026
7 checks passed
@AndreaCuneo
AndreaCuneo deleted the copilot/review-mediator-framework-implementation branch July 15, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants