quarkusio/quarkus · error · IllegalArgumentException
Only official rabbitmq images are supported
Error message
Only official rabbitmq images are supported
What it means
Dev Services for RabbitMQ starts a RabbitMQ container via Testcontainers. ConfiguredRabbitMQContainer's constructor rejects any configured image whose repository does not end with 'rabbitmq', because the dev-service setup (ports, commands, config injection) only works with official RabbitMQ images.
Source
Thrown at extensions/smallrye-reactive-messaging-rabbitmq/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/rabbitmq/deployment/RabbitMQDevServicesProcessor.java:226
private final int port;
private final int httpPort;
private final boolean useSharedNetwork;
private final String hostName;
private ConfiguredRabbitMQContainer(DockerImageName dockerImageName,
int fixedExposedPort, int fixedExposedHttpPort,
String serviceName, String defaultNetworkId, boolean useSharedNetwork) {
super(dockerImageName);
this.port = fixedExposedPort;
this.httpPort = fixedExposedHttpPort;
this.useSharedNetwork = useSharedNetwork;
withExposedPorts(RABBITMQ_PORT, RABBITMQ_HTTP_PORT);
if (serviceName != null) { // Only adds the label in dev mode.
withLabel(DEV_SERVICE_LABEL, serviceName);
withLabel(QUARKUS_DEV_SERVICE, serviceName);
}
if (!dockerImageName.getRepository().endsWith("rabbitmq")) {
throw new IllegalArgumentException("Only official rabbitmq images are supported");
}
hostName = ConfigureUtil.configureNetwork(this, defaultNetworkId, useSharedNetwork, "rabbitmq");
}
@Override
protected void configure() {
super.configure();
if (port > 0) {
addFixedExposedPort(port, RABBITMQ_PORT);
}
if (httpPort > 0) {
addFixedExposedPort(httpPort, RABBITMQ_HTTP_PORT);
}
}
@Override
public String getConnectionInfo() {
return String.format("amqp://%s:%d", getEffectiveHost(), getPort());View on GitHub (pinned to e1c734241f)
Solutions
- Use an official image such as rabbitmq:3.13-management
- If mirroring, keep the repository path ending with rabbitmq (e.g. mirror.example.com/rabbitmq:3.13)
- Disable Dev Services and configure quarkus.smallrye-reactive-messaging.rabbitmq.url to an external broker
Example fix
// before quarkus.smallrye-reactive-messaging.rabbitmq.devservices.image-name=mycompany/amqp:latest // after quarkus.smallrye-reactive-messaging.rabbitmq.devservices.image-name=rabbitmq:3.13-management
Defensive patterns
Strategy: validation
Validate before calling
String image = ConfigProvider.getConfig().getValue("quarkus.smallrye-reactive-messaging.rabbitmq.devservices.image-name", String.class);
if (image != null && !image.split(":")[0].endsWith("rabbitmq")) {
throw new IllegalStateException("Dev Services RabbitMQ requires an official rabbitmq image, got: " + image);
} Type guard
static boolean isOfficialRabbitMq(String imageName) {
if (imageName == null) return true;
String repo = imageName.split(":")[0];
return repo.endsWith("rabbitmq");
} Try / catch
try {
startRabbitDevService();
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("official rabbitmq")) {
log.error("Unsupported RabbitMQ dev-service image; use an official rabbitmq image");
}
throw e;
} Prevention
- Only override the dev-services image with official rabbitmq tags
- Keep registry-mirrored images named so the repository ends with rabbitmq
- Use an external broker URL (quarkus.smallrye-reactive-messaging.rabbitmq.url) if a custom image is mandatory
When it happens
Trigger: Setting quarkus.smallrye-reactive-messaging.rabbitmq.devservices.image-name to a non-official image (fork, renamed image, or registry image whose repository doesn't end in 'rabbitmq') while Dev Services starts in dev mode/tests.
Common situations: Using a private-registry mirror like mycompany.com/amqp-broker, or a custom-built image named differently from rabbitmq.
Related errors
- Only official eclipse-mosquitto images are supported
- The fixed port must be greater than 0
- The container image ${dockerImageName} requires you to accep
- Unable to determine datasource URL
- The fixed Kafka port must be greater than 0
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/ff350c9a62caee29.
Report an issue: GitHub.