From ae0a78107e373f75200dd79c1c531402f9497e7f Mon Sep 17 00:00:00 2001 From: Clement Escoffier Date: Tue, 1 Aug 2023 08:48:40 +0200 Subject: [PATCH] Add support for custom AMQP dev service images Fix https://github.com/quarkusio/quarkus/issues/22976 --- docs/src/main/asciidoc/amqp-dev-services.adoc | 6 +++++- .../amqp/deployment/AmqpDevServicesProcessor.java | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/src/main/asciidoc/amqp-dev-services.adoc b/docs/src/main/asciidoc/amqp-dev-services.adoc index 87a025a5797bd..09ce87e511bbb 100644 --- a/docs/src/main/asciidoc/amqp-dev-services.adoc +++ b/docs/src/main/asciidoc/amqp-dev-services.adoc @@ -51,4 +51,8 @@ You can configure the image and version using the `quarkus.amqp.devservices.imag [source, properties] ---- quarkus.amqp.devservices.image-name=quay.io/artemiscloud/activemq-artemis-broker:latest ----- \ No newline at end of file +---- + +IMPORTANT: The configured image must be _compatible_ with the `activemq-artemis-broker` one. +The container is launched with the `AMQ_USER`, `AMQ_PASSWORD` and `AMQ_EXTRA_ARGS` environment variables. +The ports 5672 and 8161 (web console) are exposed. diff --git a/extensions/smallrye-reactive-messaging-amqp/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/amqp/deployment/AmqpDevServicesProcessor.java b/extensions/smallrye-reactive-messaging-amqp/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/amqp/deployment/AmqpDevServicesProcessor.java index 7e4b49f938743..dabcbcf33c1b2 100644 --- a/extensions/smallrye-reactive-messaging-amqp/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/amqp/deployment/AmqpDevServicesProcessor.java +++ b/extensions/smallrye-reactive-messaging-amqp/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/amqp/deployment/AmqpDevServicesProcessor.java @@ -305,7 +305,12 @@ private ArtemisContainer(DockerImageName dockerImageName, String extra, int fixe if (dockerImageName.getRepository().endsWith("artemiscloud/activemq-artemis-broker")) { waitingFor(Wait.forLogMessage(".*AMQ241004.*", 1)); // Artemis console available. } else { - throw new IllegalArgumentException("Only artemiscloud/activemq-artemis-broker images are supported"); + log.infof( + "Detected a different image (%s) for the Dev Service for AMQP. Ensure it's compatible with artemiscloud/activemq-artemis-broker. " + + + "Refer to https://quarkus.io/guides/amqp-dev-services#configuring-the-image for details.", + dockerImageName); + log.info("Skipping startup probe for the Dev Service for AMQP as it does not use the default image."); } }