Skip to content

Support RabbitMQ URI connection strings for MessageBus configuration#2273

Draft
niemyjski with Copilot wants to merge 6 commits into
mainfrom
copilot/how-to-use-rabbitmq-as-messagebus
Draft

Support RabbitMQ URI connection strings for MessageBus configuration#2273
niemyjski with Copilot wants to merge 6 commits into
mainfrom
copilot/how-to-use-rabbitmq-as-messagebus

Conversation

Copilot AI commented May 31, 2026

Copy link
Copy Markdown
Contributor

Exceptionless could not reliably use Foundatio.RabbitMQ for MessageBus because RabbitMQ expects a raw URI (amqp://...), while the existing config path treated provider connection strings like key/value pairs. This made both the inline provider=rabbitmq;... form and the separate ConnectionStrings:rabbitmq form fail or get rewritten incorrectly.

  • Configuration parsing

    • Special-cases MessageBus when provider=rabbitmq so the RabbitMQ URI is preserved as a raw connection string instead of being reparsed/rebuilt.
    • Supports both documented configuration patterns:
      • inline provider + URI
      • provider selector + separate ConnectionStrings:rabbitmq value
    • Trims optional wrapping quotes around the RabbitMQ URI.
  • Regression coverage

    • Adds focused tests for:
      • inline RabbitMQ URI
      • quoted inline RabbitMQ URI
      • separate ConnectionStrings:rabbitmq URI
  • Configuration examples

    • Updates existing appsettings samples to include RabbitMQ MessageBus examples alongside the current Redis examples.

Example supported config:

ConnectionStrings:
  MessageBus: 'provider=rabbitmq;amqp://localhost/%2F'

or

ConnectionStrings:
  MessageBus: 'provider=rabbitmq'
  rabbitmq: 'amqp://localhost/%2F'

Copilot AI linked an issue May 31, 2026 that may be closed by this pull request
@CLAassistant

CLAassistant commented May 31, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ niemyjski
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Co-authored-by: niemyjski <1020579+niemyjski@users.noreply.github.com>
Copilot AI changed the title [WIP] Add example usage of RabbitMQ as message bus Support RabbitMQ URI connection strings for MessageBus configuration Jun 1, 2026
Copilot AI requested a review from niemyjski June 1, 2026 00:01
@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.Core 73% 65% 9519
Exceptionless.AppHost 38% 40% 139
Exceptionless.Insulation 23% 23% 205
Exceptionless.Web 84% 67% 6935
Summary 77% (22566 / 29491) 65% (10381 / 15880) 16798

@niemyjski

Copy link
Copy Markdown
Member

Follow-up reviewer and thermo-nuclear audit complete at 202f7c2185ef41449164f8dcab3fb6b08395b3c8.

Feedback inventory:

  • GitHub currently exposes 0 review threads, 0 inline review comments, and 0 submitted reviews from human, Codex, or Copilot reviewers. There are therefore no reviewer threads to reply to or resolve.
  • The coverage bot comment is current but informational; it reports 77% changed-line coverage and does not identify a defect.
  • The CLAassistant comment is current and externally blocked: the Copilot co-author has not signed the CLA. This is not addressable in repository code.

Validation and RCA:

  • The original failure comes from routing an AMQP URI through the generic key/value connection-string parser and builder, which interpret URI delimiters as configuration syntax and rebuild a different value.
  • The current fix isolates raw URI handling at the MessageBus configuration boundary only when the provider selector resolves to RabbitMQ. It preserves the exact inline or named amqp/amqps URI, normalizes the provider for existing case-sensitive registration, supplies the legacy Data["server"] view, and leaves Redis/key-value parsing unchanged.
  • Focused coverage proves inline and named URIs, quotes, whitespace and mixed-case selectors, encoded credentials/vhosts, URI query parameters, a trailing selector separator, and both legacy Redis forms.

Thermo-nuclear review:

  • Audited the complete 9-file origin/main...HEAD diff under the strict structural bar. No file approaches or crosses 1,000 lines; the RabbitMQ exception is contained in one configuration helper; no canonical helper is duplicated; no cross-layer type leak, non-atomic update, needless sequencing, or spaghetti branch growth remains. A broader refactor would add risk without deleting meaningful complexity.

Verification:

  • dotnet test tests/Exceptionless.Tests/Exceptionless.Tests.csproj --configuration Release -- --filter-class Exceptionless.Tests.Configuration.MessageBusOptionsTests — 9/9 passed.
  • dotnet format Exceptionless.slnx --no-restore --verify-no-changes --include src/Exceptionless.Core/Configuration/MessageBusOptions.cs tests/Exceptionless.Tests/Configuration/MessageBusOptionsTests.cs — passed.
  • dotnet build Exceptionless.slnx --no-restore --configuration Release — succeeded with 0 warnings and 0 errors.
  • git diff --check origin/main...HEAD — clean.
  • Live CI: version, test-api, test-client, test-e2e, and docker-build all pass. Expected publish/deploy/preview jobs are skipped.

No additional code change or push was needed in this follow-up. The only remaining merge blocker is administrative: the PR is still draft and license/cla remains pending for the Copilot co-author.

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.

how to use rabbitmq as messagebus or queue?

3 participants