{"record":{"id":"5a94a93ac9608f3c","repo":"microsoft/aspire","slug":"cannot-configure-the-rabbitmq-resource-builder-resource-name","errorCode":null,"errorMessage":"Cannot configure the RabbitMQ resource '{builder.Resource.Name}' to enable the management plugin as it uses an unrecognized container image registry, name, or tag.","messagePattern":"Cannot configure the RabbitMQ resource '(.+?)' to enable the management plugin as it uses an unrecognized container image registry, name, or tag\\.","errorType":"exception","errorClass":"DistributedApplicationException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Hosting.RabbitMQ/RabbitMQBuilderExtensions.cs","lineNumber":233,"sourceCode":"                    annotation.Tag = $\"{management}-{alpine}\";\n                }\n                handled = true;\n            }\n            else if (IsVersion(existingTag))\n            {\n                // Tag is in version format so just append \"-management\"\n                annotation.Tag = $\"{existingTag}-{management}\";\n                handled = true;\n            }\n        }\n\n        if (handled)\n        {\n            builder.WithHttpEndpoint(port: port, targetPort: 15672, name: RabbitMQServerResource.ManagementEndpointName);\n            return builder;\n        }\n\n        throw new DistributedApplicationException($\"Cannot configure the RabbitMQ resource '{builder.Resource.Name}' to enable the management plugin as it uses an unrecognized container image registry, name, or tag.\");\n    }\n\n    private static bool IsVersion(string tag)\n    {\n        // Must not be empty or null\n        if (string.IsNullOrEmpty(tag))\n        {\n            return false;\n        }\n\n        // First char must be a digit\n        if (!char.IsAsciiDigit(tag[0]))\n        {\n            return false;\n        }\n\n        // Last char must be digit\n        if (!char.IsAsciiDigit(tag[^1]))","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting.RabbitMQ/RabbitMQBuilderExtensions.cs#L215-L251","documentation":"WithManagementPlugin enables RabbitMQ's management UI by adding an HTTP endpoint on port 15672, but only when it recognizes the container image (registry, name, tag). If the image was customized to something it cannot classify (e.g. a custom registry or a non-standard tag), it throws DistributedApplicationException because enabling the plugin requires modifying the image/tag it does not understand.","triggerScenarios":"Calling .WithManagementPlugin() on a RabbitMQ resource whose image was changed via WithImageRegistry/WithImage/WithTag to values that do not match the known RabbitMQ images or recognized version-tag patterns.","commonSituations":"Pointing at a corporate mirror registry; pinning a custom tag like '3-custom' or a digest; using a derivative image (e.g. with pre-installed plugins) where the library cannot infer how to enable management.","solutions":["Use a standard RabbitMQ image with a recognized version tag (e.g. '3' or '3-management') before calling WithManagementPlugin.","If a mirror registry is required, also use WithImage/WithTag values that still match known RabbitMQ names/tags.","Manually add the management endpoint instead: .WithHttpEndpoint(port: 15672, targetPort: 15672, name: \"management\") and use a -management image tag yourself.","Alternatively enable the plugin via a custom entrypoint/command on the container."],"exampleFix":"// before\nvar rabbitmq = builder.AddRabbitMQ(\"rabbitmq\").WithImageRegistry(\"my.registry.io\").WithManagementPlugin();\n\n// after\nvar rabbitmq = builder.AddRabbitMQ(\"rabbitmq\")\n    .WithImageRegistry(\"my.registry.io\")\n    .WithImage(\"rabbitmq\", \"3-management\")\n    .WithHttpEndpoint(port: 15672, targetPort: 15672, name: \"management\");","handlingStrategy":"validation","validationCode":"// Only call WithManagementPlugin on stock RabbitMQ images\nbool isStockImage = resource.Annotations.OfType<ContainerImageAnnotation>() is { } img &&\n    (img.Image == \"rabbitmq\");\nif (!isStockImage)\n{\n    // configure the management endpoint manually instead\n}","typeGuard":null,"tryCatchPattern":"try\n{\n    rabbitmq.WithManagementPlugin();\n}\ncatch (DistributedApplicationException ex) when (ex.Message.Contains(\"management plugin\"))\n{\n    rabbitmq.WithHttpEndpoint(port: 15672, targetPort: 15672, name: \"management\");\n}","preventionTips":["Keep the default rabbitmq image and a standard version tag when using WithManagementPlugin.","For mirror registries, add the -management tag and the endpoint manually.","Prefer image-agnostic manual endpoint configuration in enterprise environments."],"tags":["rabbitmq","container-image","management-plugin","aspire-hosting"],"backgroundTag":"unsupported-config-value","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T09:17:21.228Z"}