Skip to content

Record undeclared RabbitMQ dispatch targets in the topology under explicit binding - #10492

Closed
PascalSenn wants to merge 1 commit into
mainfrom
ps/mocha-rabbitmq-explicit-dispatch-targets
Closed

PascalSenn wants to merge 1 commit into
mainfrom
ps/mocha-rabbitmq-explicit-dispatch-targets

Conversation

@PascalSenn

Copy link
Copy Markdown
Member

Stack created with GitHub Stacks CLI • Give Feedback 💬

Copilot AI balanced review requested due to automatic review settings October 6, 2026 17:24
@PascalSenn
PascalSenn added this pull request to stack #10493 October 6, 2026 17:25
@github-actions github-actions Bot added 📚 documentation This issue is about working on our documentation. 🌶️ mocha labels Oct 6, 2026
@PascalSenn PascalSenn closed this Oct 6, 2026
@PascalSenn
PascalSenn removed this pull request from stack #10493 October 6, 2026 17:25

Copilot AI left a comment

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.

Copilot review overview

🟡 Changes recommended

It unnecessarily removes public compatibility properties and introduces exceptions outside the required ThrowHelper pattern.

Review effort: Balanced
Findings: 1 High severity · 1 Low severity

Open (2)
What changed in this PR

Records undeclared RabbitMQ dispatch targets in topology while preventing provisioning under explicit binding.

Changes:

  • Adds non-provisioned queue/exchange topology resources.
  • Resolves dispatch endpoints through topology destinations.
  • Updates documentation and tests.
File Description
website/​content/​docs/​mocha/​routing-and-endpoints.md Documents explicit-binding behavior.
src/​Mocha/​test/​Mocha.Transport.RabbitMQ.Tests/​RabbitMQDispatchEndpointTests.cs Tests topology recording and destination resolution.
src/​Mocha/​src/​Mocha/​Endpoints/​DispatchEndpoint.cs Updates destination documentation.
src/​Mocha/​src/​Mocha.Transport.RabbitMQ/​UriHelpers.cs Removes relocated topology parsing.
src/​Mocha/​src/​Mocha.Transport.RabbitMQ/​Topology/​RabbitMQRoutingStrategy.cs Creates unprovisioned topology targets.
src/​Mocha/​src/​Mocha.Transport.RabbitMQ/​RabbitMQMessagingTransport.cs Matches endpoints through destination resources.
src/​Mocha/​src/​Mocha.Transport.RabbitMQ/​RabbitMQDispatchEndpoint.cs Uses topology resources during dispatch.
src/​Mocha/​src/​Mocha.Transport.RabbitMQ/​Descriptors/​IRabbitMQDispatchEndpointDescriptor.cs Updates descriptor documentation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 15 to 18
/// <summary>
/// Gets the topology queue this endpoint targets, or <c>null</c> if the endpoint targets an
/// exchange or a queue that is not part of the transport topology.
/// Gets the target queue for this endpoint, or <c>null</c> if the endpoint targets an exchange.
/// </summary>
public RabbitMQQueue? Queue { get; private set; }
Comment on lines +172 to +174
Exchange =
topology.Exchanges.FirstOrDefault(e => e.Name == configuration.ExchangeName)
?? throw new InvalidOperationException("Exchange not found");
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Patch coverage

93.9% of changed lines covered (92/98)

File Covered Changed Patch %
…/src/Mocha.Transport.RabbitMQ/RabbitMQMessagingTransport.cs 22 24 91.7% 🟡
…/Mocha.Transport.RabbitMQ/Topology/RabbitMQRoutingStrategy.cs 47 51 92.2% 🟡
…/src/Mocha.Transport.RabbitMQ/RabbitMQDispatchEndpoint.cs 23 23 100.0% 🟢
Uncovered changed lines (JSON)
{
  "sha": "337771ab103afa0d6771ba51e73bae61c0918227",
  "files": [
    { "path": "src/Mocha/src/Mocha.Transport.RabbitMQ/RabbitMQMessagingTransport.cs", "ranges": [[295, 296]] },
    { "path": "src/Mocha/src/Mocha.Transport.RabbitMQ/Topology/RabbitMQRoutingStrategy.cs", "ranges": [[595, 596], [619, 620]] }
  ]
}

Project coverage: 58.5% (313812/536093 lines)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📚 documentation This issue is about working on our documentation. 🌶️ mocha

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants