Skip to content

(Aspire doc) Connect to an existing RabbitMQ instance #1092

Closed

Description

@Davilink

I try to use .AsExisting() just like the documentation: https://aspire.dev/integrations/messaging/rabbitmq/rabbitmq-host/#connect-to-an-existing-rabbitmq-instance but that extension method doesn't not exists. I thing the documentation is obsolete.

Step to reproduce

Image

What happen

Image

AppHost Project details

<Project Sdk="Aspire.AppHost.Sdk/13.3.5">
  <ItemGroup>
    <PackageReference Include="Aspire.Hosting.RabbitMQ" Version="13.3.5" />
  </ItemGroup>

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>
</Project>

Also the first line it say:

In C#, call AsExisting instead of AddRabbitMQ to reference an externally managed RabbitMQ instance:

but in the example it show this
Image

so ... do we need to use AddRabbitMQ or not ? It's confusing.

Activity

  1. IEvangelist commented on Jun 2, 2026

    @IEvangelist
    Member

    Triage note — likely duplicate of #1074

    Same root cause as #1074: the docs page describes a .AsExisting() extension on the non-Azure IResourceBuilder<RabbitMQResource> that doesn't exist on Aspire.Hosting.RabbitMQ. Per the discussion on #1074, AsExisting is intended for Azure-managed resources only, so this docs page is hallucinated and needs to be rewritten (most likely removed in favour of the standard AddConnectionString/existing-connection-string pattern).

    Recommendation: close this in favor of #1074 (which already has the broader audit context and is assigned), or keep open and fold the RabbitMQ page fix into the same audit. Same theme also tracked in #246. I'll defer the close decision to a maintainer.

    cc David Pine (@IEvangelist)

  2. IEvangelist commented on Jun 2, 2026

    @IEvangelist
    Member

    Duplicate of #1074

    Same root cause: the docs page describes an AsExisting extension method that doesn't exist on non-Azure resource builders. As David Fowler (@davidfowl) confirmed in #1074, AsExisting is Azure-only, so both the RabbitMQ (rabbitmq-host.mdx) and Redis (redis-host.mdx) pages currently document a non-existent API.

    Tracking the fix in #1074 (which now scopes the broader audit across non-Azure integration docs). Recommend closing this issue in favor of #1074 — but leaving open until a maintainer confirms.

  3. IEvangelist commented on Jun 2, 2026

    @IEvangelist
    Member

    Closed by #1076

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions