diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index 0d08c74508a39..f6e7d4139b4d4 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -7,7 +7,7 @@ com.gradle common-custom-user-data-maven-extension - 1.12.5 + 1.13 com.gradle diff --git a/bom/application/pom.xml b/bom/application/pom.xml index 416081863695b..dd7998df06214 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -1522,67 +1522,67 @@ io.quarkus - quarkus-smallrye-reactive-messaging + quarkus-messaging ${project.version} io.quarkus - quarkus-smallrye-reactive-messaging-kotlin + quarkus-messaging-kotlin ${project.version} io.quarkus - quarkus-smallrye-reactive-messaging-deployment + quarkus-messaging-deployment ${project.version} io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-messaging-kafka ${project.version} io.quarkus - quarkus-smallrye-reactive-messaging-kafka-deployment + quarkus-messaging-kafka-deployment ${project.version} io.quarkus - quarkus-smallrye-reactive-messaging-pulsar + quarkus-messaging-pulsar ${project.version} io.quarkus - quarkus-smallrye-reactive-messaging-pulsar-deployment + quarkus-messaging-pulsar-deployment ${project.version} io.quarkus - quarkus-smallrye-reactive-messaging-amqp + quarkus-messaging-amqp ${project.version} io.quarkus - quarkus-smallrye-reactive-messaging-amqp-deployment + quarkus-messaging-amqp-deployment ${project.version} io.quarkus - quarkus-smallrye-reactive-messaging-mqtt + quarkus-messaging-mqtt ${project.version} io.quarkus - quarkus-smallrye-reactive-messaging-mqtt-deployment + quarkus-messaging-mqtt-deployment ${project.version} io.quarkus - quarkus-smallrye-reactive-messaging-rabbitmq + quarkus-messaging-rabbitmq ${project.version} io.quarkus - quarkus-smallrye-reactive-messaging-rabbitmq-deployment + quarkus-messaging-rabbitmq-deployment ${project.version} @@ -6526,6 +6526,73 @@ quarkus-spring-web-resteasy-classic-deployment ${project.version} + + + + io.quarkus + quarkus-smallrye-reactive-messaging + ${project.version} + + + io.quarkus + quarkus-smallrye-reactive-messaging-kotlin + ${project.version} + + + io.quarkus + quarkus-smallrye-reactive-messaging-deployment + ${project.version} + + + io.quarkus + quarkus-smallrye-reactive-messaging-kafka + ${project.version} + + + io.quarkus + quarkus-smallrye-reactive-messaging-kafka-deployment + ${project.version} + + + io.quarkus + quarkus-smallrye-reactive-messaging-pulsar + ${project.version} + + + io.quarkus + quarkus-smallrye-reactive-messaging-pulsar-deployment + ${project.version} + + + io.quarkus + quarkus-smallrye-reactive-messaging-amqp + ${project.version} + + + io.quarkus + quarkus-smallrye-reactive-messaging-amqp-deployment + ${project.version} + + + io.quarkus + quarkus-smallrye-reactive-messaging-mqtt + ${project.version} + + + io.quarkus + quarkus-smallrye-reactive-messaging-mqtt-deployment + ${project.version} + + + io.quarkus + quarkus-smallrye-reactive-messaging-rabbitmq + ${project.version} + + + io.quarkus + quarkus-smallrye-reactive-messaging-rabbitmq-deployment + ${project.version} + diff --git a/core/deployment/src/main/java/io/quarkus/deployment/Capability.java b/core/deployment/src/main/java/io/quarkus/deployment/Capability.java index cb86e4a416160..ccac2064b6255 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/Capability.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/Capability.java @@ -140,7 +140,12 @@ public interface Capability { String KAFKA = QUARKUS_PREFIX + ".kafka"; + @Deprecated + /** + * @deprecated use {@link #MESSAGING} instead + */ String SMALLRYE_REACTIVE_MESSAGING = QUARKUS_PREFIX + ".smallrye.reactive.messaging"; + String MESSAGING = QUARKUS_PREFIX + ".messaging"; String REDIS_CLIENT = QUARKUS_PREFIX + ".redis"; String CACHE = QUARKUS_PREFIX + ".cache"; diff --git a/core/deployment/src/main/java/io/quarkus/deployment/Feature.java b/core/deployment/src/main/java/io/quarkus/deployment/Feature.java index df6f6737bcf32..066beb6502c50 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/Feature.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/Feature.java @@ -131,12 +131,12 @@ public enum Feature { SMALLRYE_JWT, SMALLRYE_METRICS, SMALLRYE_OPENAPI, - SMALLRYE_REACTIVE_MESSAGING, - SMALLRYE_REACTIVE_MESSAGING_KAFKA, - SMALLRYE_REACTIVE_MESSAGING_AMQP, - SMALLRYE_REACTIVE_MESSAGING_MQTT, - SMALLRYE_REACTIVE_MESSAGING_RABBITMQ, - SMALLRYE_REACTIVE_MESSAGING_PULSAR, + MESSAGING, + MESSAGING_KAFKA, + MESSAGING_AMQP, + MESSAGING_MQTT, + MESSAGING_RABBITMQ, + MESSAGING_PULSAR, SMALLRYE_REACTIVE_STREAMS_OPERATORS, SMALLRYE_REACTIVE_TYPE_CONVERTERS, SMALLRYE_GRAPHQL, diff --git a/devtools/bom-descriptor-json/pom.xml b/devtools/bom-descriptor-json/pom.xml index 08ece66d3f7ad..3bd719fcf959b 100644 --- a/devtools/bom-descriptor-json/pom.xml +++ b/devtools/bom-descriptor-json/pom.xml @@ -1318,6 +1318,84 @@ + + io.quarkus + quarkus-messaging + ${project.version} + pom + test + + + * + * + + + + + io.quarkus + quarkus-messaging-amqp + ${project.version} + pom + test + + + * + * + + + + + io.quarkus + quarkus-messaging-kafka + ${project.version} + pom + test + + + * + * + + + + + io.quarkus + quarkus-messaging-mqtt + ${project.version} + pom + test + + + * + * + + + + + io.quarkus + quarkus-messaging-pulsar + ${project.version} + pom + test + + + * + * + + + + + io.quarkus + quarkus-messaging-rabbitmq + ${project.version} + pom + test + + + * + * + + + io.quarkus quarkus-micrometer @@ -2514,84 +2592,6 @@ - - io.quarkus - quarkus-smallrye-reactive-messaging - ${project.version} - pom - test - - - * - * - - - - - io.quarkus - quarkus-smallrye-reactive-messaging-amqp - ${project.version} - pom - test - - - * - * - - - - - io.quarkus - quarkus-smallrye-reactive-messaging-kafka - ${project.version} - pom - test - - - * - * - - - - - io.quarkus - quarkus-smallrye-reactive-messaging-mqtt - ${project.version} - pom - test - - - * - * - - - - - io.quarkus - quarkus-smallrye-reactive-messaging-pulsar - ${project.version} - pom - test - - - * - * - - - - - io.quarkus - quarkus-smallrye-reactive-messaging-rabbitmq - ${project.version} - pom - test - - - * - * - - - io.quarkus quarkus-smallrye-reactive-streams-operators diff --git a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/base/README.tpl.qute.md b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/messaging-codestart/base/README.tpl.qute.md similarity index 66% rename from devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/base/README.tpl.qute.md rename to devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/messaging-codestart/base/README.tpl.qute.md index 4b89133ba542e..d1f55731de018 100644 --- a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/base/README.tpl.qute.md +++ b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/messaging-codestart/base/README.tpl.qute.md @@ -2,11 +2,11 @@ {#each input.selected-extensions-ga} {#switch it} -{#case 'io.quarkus:quarkus-smallrye-reactive-messaging-kafka'} +{#case 'io.quarkus:quarkus-messaging-kafka'} [Related Apache Kafka guide section...](https://quarkus.io/guides/kafka-reactive-getting-started) -{#case 'io.quarkus:quarkus-smallrye-reactive-messaging-amqp'} +{#case 'io.quarkus:quarkus-messaging-amqp'} [Related Apache AMQP 1.0 guide section...](https://quarkus.io/guides/amqp) {/switch} -{/each} \ No newline at end of file +{/each} diff --git a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/base/src/main/resources/application.tpl.qute.yml b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/messaging-codestart/base/src/main/resources/application.tpl.qute.yml similarity index 73% rename from devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/base/src/main/resources/application.tpl.qute.yml rename to devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/messaging-codestart/base/src/main/resources/application.tpl.qute.yml index 43a617e888278..c99225b19aa2c 100644 --- a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/base/src/main/resources/application.tpl.qute.yml +++ b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/messaging-codestart/base/src/main/resources/application.tpl.qute.yml @@ -1,6 +1,6 @@ {#each input.selected-extensions-ga} {#switch it} -{#case 'io.quarkus:quarkus-smallrye-reactive-messaging-kafka'} +{#case 'io.quarkus:quarkus-messaging-kafka'} mp: messaging: outgoing: @@ -13,7 +13,7 @@ mp: offset: reset: earliest -{#case 'io.quarkus:quarkus-smallrye-reactive-messaging-amqp'} +{#case 'io.quarkus:quarkus-messaging-amqp'} mp: messaging: outgoing: @@ -23,4 +23,4 @@ mp: words-in: address: words {/switch} -{/each} \ No newline at end of file +{/each} diff --git a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/messaging-codestart/codestart.yml b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/messaging-codestart/codestart.yml new file mode 100644 index 0000000000000..47f772d3b06ab --- /dev/null +++ b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/messaging-codestart/codestart.yml @@ -0,0 +1,10 @@ +name: messaging-codestart +ref: messaging +tags: extension-codestart +type: code +metadata: + title: Messaging codestart + description: Use Quarkus Messaging +language: + base: + dependencies: diff --git a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/java/src/main/java/org/acme/MyReactiveMessagingApplication.java b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/messaging-codestart/java/src/main/java/org/acme/MyMessagingApplication.java similarity index 91% rename from devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/java/src/main/java/org/acme/MyReactiveMessagingApplication.java rename to devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/messaging-codestart/java/src/main/java/org/acme/MyMessagingApplication.java index 8e05b96dd60b6..c2254aff79618 100644 --- a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/java/src/main/java/org/acme/MyReactiveMessagingApplication.java +++ b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/messaging-codestart/java/src/main/java/org/acme/MyMessagingApplication.java @@ -9,7 +9,7 @@ import java.util.stream.Stream; @ApplicationScoped -public class MyReactiveMessagingApplication { +public class MyMessagingApplication { @Inject @Channel("words-out") @@ -20,7 +20,7 @@ public class MyReactiveMessagingApplication { * Messages are sent to the broker. **/ void onStart(@Observes StartupEvent ev) { - Stream.of("Hello", "with", "SmallRye", "reactive", "message").forEach(string -> emitter.send(string)); + Stream.of("Hello", "with", "Quarkus", "Messaging", "message").forEach(string -> emitter.send(string)); } /** diff --git a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/java/src/test/java/org/acme/MyReactiveMessagingApplicationTest.java b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/messaging-codestart/java/src/test/java/org/acme/MyMessagingApplicationTest.java similarity index 87% rename from devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/java/src/test/java/org/acme/MyReactiveMessagingApplicationTest.java rename to devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/messaging-codestart/java/src/test/java/org/acme/MyMessagingApplicationTest.java index 33bef2283995d..26b5971a06b6a 100644 --- a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/java/src/test/java/org/acme/MyReactiveMessagingApplicationTest.java +++ b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/messaging-codestart/java/src/test/java/org/acme/MyMessagingApplicationTest.java @@ -12,10 +12,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals; @QuarkusTest -class MyReactiveMessagingApplicationTest { +class MyMessagingApplicationTest { @Inject - MyReactiveMessagingApplication application; + MyMessagingApplication application; @Test void test() { diff --git a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/codestart.yml b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/codestart.yml deleted file mode 100644 index 50e0bedddb2c1..0000000000000 --- a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/codestart.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: reactive-messaging-codestart -ref: reactive-messaging -tags: extension-codestart -type: code -metadata: - title: Reactive Messaging codestart - description: Use SmallRye Reactive Messaging -language: - base: - dependencies: diff --git a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-client-codestart/base/README.tpl.qute.md b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-client-codestart/base/README.tpl.qute.md new file mode 100644 index 0000000000000..405280158877d --- /dev/null +++ b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-client-codestart/base/README.tpl.qute.md @@ -0,0 +1 @@ +{#include readme-header /} \ No newline at end of file diff --git a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-client-codestart/codestart.yml b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-client-codestart/codestart.yml new file mode 100644 index 0000000000000..e6dcd5d440941 --- /dev/null +++ b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-client-codestart/codestart.yml @@ -0,0 +1,13 @@ +name: resteasy-client-codestart +ref: resteasy-client +type: code +tags: extension-codestart +metadata: + title: RESTEasy Client + description: Invoke different services through REST with JSON + related-guide-section: https://quarkus.io/guides/resteasy-client +language: + base: + dependencies: + - io.quarkus:quarkus-resteasy-client + - io.quarkus:quarkus-resteasy-client-jackson diff --git a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-client-codestart/java/src/main/java/org/acme/MyRemoteService.java b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-client-codestart/java/src/main/java/org/acme/MyRemoteService.java new file mode 100644 index 0000000000000..9cc8e8ba1e27c --- /dev/null +++ b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-client-codestart/java/src/main/java/org/acme/MyRemoteService.java @@ -0,0 +1,37 @@ +package org.acme; + +import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; + +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.QueryParam; +import java.util.List; +import java.util.Set; + +/** + * To use it via injection. + * + * {@code + * @Inject + * @RestClient + * MyRemoteService myRemoteService; + * + * public void doSomething() { + * Set restClientExtensions = myRemoteService.getExtensionsById("io.quarkus:quarkus-hibernate-validator"); + * } + * } + */ +@RegisterRestClient(baseUri = "https://stage.code.quarkus.io/api") +public interface MyRemoteService { + + @GET + @Path("/extensions") + Set getExtensionsById(@QueryParam("id") String id); + + class Extension { + public String id; + public String name; + public String shortName; + public List keywords; + } +} diff --git a/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-client-codestart/kotlin/src/main/kotlin/org/acme/MyRemoteService.kt b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-client-codestart/kotlin/src/main/kotlin/org/acme/MyRemoteService.kt new file mode 100644 index 0000000000000..e28a0ae228c7d --- /dev/null +++ b/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/resteasy-client-codestart/kotlin/src/main/kotlin/org/acme/MyRemoteService.kt @@ -0,0 +1,29 @@ +package org.acme + +import org.eclipse.microprofile.rest.client.inject.RegisterRestClient +import jakarta.ws.rs.GET +import jakarta.ws.rs.Path +import jakarta.ws.rs.QueryParam + +/** + * To use it via injection. + * + * ```kotlin + * @Inject + * @RestClient + * lateinit var myRemoteService: MyRemoteService + * + * fun doSomething() { + * val restClientExtensions = myRemoteService.getExtensionsById("io.quarkus:quarkus-rest-client") + * } + * ``` + */ +@RegisterRestClient(baseUri = "https://stage.code.quarkus.io/api") +interface MyRemoteService { + + @GET + @Path("/extensions") + fun getExtensionsById(@QueryParam("id") id: String): Set + + data class Extension(val id: String, val name: String, val shortName: String, val keywords: List) +} diff --git a/docs/pom.xml b/docs/pom.xml index 0a5aacc53f629..7e96fa36caba9 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -1334,6 +1334,84 @@ + + io.quarkus + quarkus-messaging-deployment + ${project.version} + pom + test + + + * + * + + + + + io.quarkus + quarkus-messaging-amqp-deployment + ${project.version} + pom + test + + + * + * + + + + + io.quarkus + quarkus-messaging-kafka-deployment + ${project.version} + pom + test + + + * + * + + + + + io.quarkus + quarkus-messaging-mqtt-deployment + ${project.version} + pom + test + + + * + * + + + + + io.quarkus + quarkus-messaging-pulsar-deployment + ${project.version} + pom + test + + + * + * + + + + + io.quarkus + quarkus-messaging-rabbitmq-deployment + ${project.version} + pom + test + + + * + * + + + io.quarkus quarkus-micrometer-deployment @@ -2530,84 +2608,6 @@ - - io.quarkus - quarkus-smallrye-reactive-messaging-deployment - ${project.version} - pom - test - - - * - * - - - - - io.quarkus - quarkus-smallrye-reactive-messaging-amqp-deployment - ${project.version} - pom - test - - - * - * - - - - - io.quarkus - quarkus-smallrye-reactive-messaging-kafka-deployment - ${project.version} - pom - test - - - * - * - - - - - io.quarkus - quarkus-smallrye-reactive-messaging-mqtt-deployment - ${project.version} - pom - test - - - * - * - - - - - io.quarkus - quarkus-smallrye-reactive-messaging-pulsar-deployment - ${project.version} - pom - test - - - * - * - - - - - io.quarkus - quarkus-smallrye-reactive-messaging-rabbitmq-deployment - ${project.version} - pom - test - - - * - * - - - io.quarkus quarkus-smallrye-reactive-streams-operators-deployment diff --git a/docs/src/main/asciidoc/amqp-dev-services.adoc b/docs/src/main/asciidoc/amqp-dev-services.adoc index f68fb219e3abc..0c1c921b86ff6 100644 --- a/docs/src/main/asciidoc/amqp-dev-services.adoc +++ b/docs/src/main/asciidoc/amqp-dev-services.adoc @@ -7,7 +7,7 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc include::_attributes.adoc[] :categories: messaging :summary: Start AMQP automatically in dev and test modes. -:extensions: io.quarkus:quarkus-smallrye-reactive-messaging-amqp +:extensions: io.quarkus:quarkus-messaging-amqp :topics: messaging,amqp,dev-services,testing,dev-mode Dev Services for AMQP automatically starts an AMQP 1.0 broker in dev mode and when running tests. diff --git a/docs/src/main/asciidoc/amqp-reference.adoc b/docs/src/main/asciidoc/amqp-reference.adoc index 10cdff6374bae..3f543b44faaac 100644 --- a/docs/src/main/asciidoc/amqp-reference.adoc +++ b/docs/src/main/asciidoc/amqp-reference.adoc @@ -6,7 +6,7 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc = Reactive Messaging AMQP 1.0 Connector Reference Documentation include::_attributes.adoc[] :categories: messaging -:extensions: io.quarkus:quarkus-smallrye-reactive-messaging-amqp +:extensions: io.quarkus:quarkus-messaging-amqp :topics: messaging,amqp This guide is the companion from the xref:amqp.adoc[Getting Started with AMQP 1.0]. @@ -22,11 +22,11 @@ Check <> to get more details. == AMQP connector extension -To use the connector, you need to add the `quarkus-smallrye-reactive-messaging-amqp` extension. +To use the connector, you need to add the `quarkus-messaging-amqp` extension. You can add the extension to your project using: -:add-extension-extensions: quarkus-smallrye-reactive-messaging-amqp +:add-extension-extensions: quarkus-messaging-amqp include::{includes}/devtools/extension-add.adoc[] Or just add the following dependency to your project: @@ -36,14 +36,14 @@ Or just add the following dependency to your project: ---- io.quarkus - quarkus-smallrye-reactive-messaging-amqp + quarkus-messaging-amqp ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-smallrye-reactive-messaging-amqp") +implementation("io.quarkus:quarkus-messaging-amqp") ---- Once added to your project, you can map _channels_ to AMQP addresses by configuring the `connector` attribute: @@ -68,7 +68,7 @@ This auto-attachment can be disabled using: [source, properties] ---- -quarkus.reactive-messaging.auto-connector-attachment=false +quarkus.messaging.auto-connector-attachment=false ---- ==== diff --git a/docs/src/main/asciidoc/amqp.adoc b/docs/src/main/asciidoc/amqp.adoc index 29aac0172ef54..d36d6391cb059 100644 --- a/docs/src/main/asciidoc/amqp.adoc +++ b/docs/src/main/asciidoc/amqp.adoc @@ -3,16 +3,16 @@ This guide is maintained in the main Quarkus repository and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// -= Getting Started to SmallRye Reactive Messaging with AMQP 1.0 += Getting Started to Quarkus Messaging with AMQP 1.0 include::_attributes.adoc[] :categories: messaging -:summary: This guide demonstrates how your Quarkus application can utilize SmallRye Reactive Messaging to interact with AMQP. -:extensions: io.quarkus:quarkus-smallrye-reactive-messaging-amqp +:summary: This guide demonstrates how your Quarkus application can utilize Quarkus Messaging to interact with AMQP. +:extensions: io.quarkus:quarkus-messaging-amqp :topics: messaging,amqp -This guide demonstrates how your Quarkus application can utilize SmallRye Reactive Messaging to interact with AMQP 1.0. +This guide demonstrates how your Quarkus application can utilize Quarkus Messaging to interact with AMQP 1.0. -IMPORTANT: If you want to use RabbitMQ, you should use the xref:rabbitmq.adoc[SmallRye Reactive Messaging RabbitMQ extension]. +IMPORTANT: If you want to use RabbitMQ, you should use the xref:rabbitmq.adoc[Quarkus Messaging RabbitMQ extension]. Alternatively, if you want to use RabbitMQ with AMQP 1.0 you need to enable the AMQP 1.0 plugin in the RabbitMQ broker; check the https://smallrye.io/smallrye-reactive-messaging/smallrye-reactive-messaging/3.9/amqp/amqp.html#amqp-rabbitmq[connecting to RabbitMQ] documentation. @@ -58,7 +58,7 @@ First, we need to create two projects: the _producer_ and the _processor_. To create the _producer_ project, in a terminal run: :create-app-artifact-id: amqp-quickstart-producer -:create-app-extensions: rest-jackson,smallrye-reactive-messaging-amqp +:create-app-extensions: rest-jackson,messaging-amqp :create-app-post-command: include::{includes}/devtools/create-app.adoc[] @@ -70,7 +70,7 @@ This command creates the project structure and select the two Quarkus extensions To create the _processor_ project, from the same directory, run: :create-app-artifact-id: amqp-quickstart-processor -:create-app-extensions: smallrye-reactive-messaging-amqp +:create-app-extensions: messaging-amqp :create-app-post-command: include::{includes}/devtools/create-app.adoc[] diff --git a/docs/src/main/asciidoc/apicurio-registry-dev-services.adoc b/docs/src/main/asciidoc/apicurio-registry-dev-services.adoc index fc4f80b948176..5a3819edc8811 100644 --- a/docs/src/main/asciidoc/apicurio-registry-dev-services.adoc +++ b/docs/src/main/asciidoc/apicurio-registry-dev-services.adoc @@ -8,7 +8,7 @@ include::_attributes.adoc[] :categories: messaging :summary: Start Apicurio Registry automatically in dev and test modes. :topics: messaging,kafka,apicurio,registry,dev-services,dev-mode,testing -:extensions: io.quarkus:quarkus-apicurio-registry-avro,io.quarkus:quarkus-smallrye-reactive-messaging-kafka +:extensions: io.quarkus:quarkus-apicurio-registry-avro,io.quarkus:quarkus-messaging-kafka If an extension for schema registry, such as `quarkus-apicurio-registry-avro` or `quarkus-confluent-registry-avro`, is present, Dev Services for Apicurio Registry automatically starts an Apicurio Registry instance in dev mode and when running tests. Also, all Kafka channels in SmallRye Reactive Messaging are automatically configured to use this registry. diff --git a/docs/src/main/asciidoc/credentials-provider.adoc b/docs/src/main/asciidoc/credentials-provider.adoc index 579ea95715fc9..a651b5dca1fba 100644 --- a/docs/src/main/asciidoc/credentials-provider.adoc +++ b/docs/src/main/asciidoc/credentials-provider.adoc @@ -37,7 +37,7 @@ by the following credentials consumer extensions: * `reactive-pg-client` * `oidc` * `oidc-client` -* `smallrye-reactive-messaging-rabbitmq` +* `messaging-rabbitmq` All extensions that rely on username/password authentication also allow setting configuration properties in the `application.properties` as an alternative. But the `Credentials Provider` is the only option @@ -114,7 +114,7 @@ property is less than the credentials expiration time. === RabbitMQ -When using the `smallrye-reactive-messaging-rabbitmq` extension there is no configuration needed. The +When using the `messaging-rabbitmq` extension there is no configuration needed. The extension will automatically recycle connections before their credentials expire based on the expiration timestamp provided by the Credentials Provider. diff --git a/docs/src/main/asciidoc/datasource.adoc b/docs/src/main/asciidoc/datasource.adoc index d8876dbc1fdc5..e4f0065489314 100644 --- a/docs/src/main/asciidoc/datasource.adoc +++ b/docs/src/main/asciidoc/datasource.adoc @@ -23,7 +23,7 @@ Applications use datasources to access relational databases. Quarkus provides a unified configuration model to define datasources for Java Database Connectivity (JDBC) and Reactive database drivers. Quarkus uses link:https://agroal.github.io/[Agroal] and link:https://vertx.io/[Vert.x] to provide high-performance, scalable data source connection pooling for JDBC and reactive drivers. -The `jdbc-\*` and `reactive-*` extensions provide build time optimizations and integrate configured data sources with Quarkus features like security, health checks, and metrics. +The `quarkus-jdbc-\*` and `quarkus-reactive-*-client` extensions provide build time optimizations and integrate configured data sources with Quarkus features like security, health checks, and metrics. For more information about consuming and using a reactive datasource, see the Quarkus xref:reactive-sql-clients.adoc[Reactive SQL clients] guide. @@ -62,14 +62,14 @@ For more details and optional configurations, see xref:databases-dev-services.ad . Add the correct JDBC extension for the database of your choice. -* `jdbc-db2` -* `jdbc-derby` -* `jdbc-h2` -* `jdbc-mariadb` -* `jdbc-mssql` -* `jdbc-mysql` -* `jdbc-oracle` -* `jdbc-postgresql` +* `quarkus-jdbc-db2` +* `quarkus-jdbc-derby` +* `quarkus-jdbc-h2` +* `quarkus-jdbc-mariadb` +* `quarkus-jdbc-mssql` +* `quarkus-jdbc-mysql` +* `quarkus-jdbc-oracle` +* `quarkus-jdbc-postgresql` . Configure your JDBC datasource: + @@ -101,11 +101,11 @@ For more information about pool size adjustment properties, see the <> for suggestions regarding integration testing. ==== -* DB2 - `jdbc-db2` -* MariaDB - `jdbc-mariadb` -* Microsoft SQL Server - `jdbc-mssql` -* MySQL - `jdbc-mysql` -* Oracle - `jdbc-oracle` -* PostgreSQL - `jdbc-postgresql` +* DB2 - `quarkus-jdbc-db2` +* MariaDB - `quarkus-jdbc-mariadb` +* Microsoft SQL Server - `quarkus-jdbc-mssql` +* MySQL - `quarkus-jdbc-mysql` +* Oracle - `quarkus-jdbc-oracle` +* PostgreSQL - `quarkus-jdbc-postgresql` * Other JDBC extensions, such as link:https://github.com/quarkiverse/quarkus-jdbc-sqlite[SQLite] and its link:https://quarkiverse.github.io/quarkiverse-docs/quarkus-jdbc-sqlite/dev/index.html[documentation], can be found in the https://github.com/quarkiverse[Quarkiverse]. + For example, to add the PostgreSQL driver dependency: diff --git a/docs/src/main/asciidoc/deploying-to-kubernetes.adoc b/docs/src/main/asciidoc/deploying-to-kubernetes.adoc index be05f697039ed..523793c9373bc 100644 --- a/docs/src/main/asciidoc/deploying-to-kubernetes.adoc +++ b/docs/src/main/asciidoc/deploying-to-kubernetes.adoc @@ -1508,7 +1508,7 @@ To enable Service Binding for supported extensions, add the `quarkus-kubernetes- * `quarkus-mongodb-client` * `quarkus-kafka-client` -* `quarkus-smallrye-reactive-messaging-kafka` +* `quarkus-messaging-kafka` * `quarkus-reactive-db2-client` * `quarkus-reactive-mssql-client` diff --git a/docs/src/main/asciidoc/dev-services.adoc b/docs/src/main/asciidoc/dev-services.adoc index d8dff1bd729e2..f8aea5e5c5f14 100644 --- a/docs/src/main/asciidoc/dev-services.adoc +++ b/docs/src/main/asciidoc/dev-services.adoc @@ -28,7 +28,7 @@ If you don't have Docker installed you will need to configure your services norm == AMQP -The AMQP Dev Service will be enabled when the `quarkus-smallrye-reactive-messaging-amqp` extension is present in your application, and +The AMQP Dev Service will be enabled when the `quarkus-messaging-amqp` extension is present in your application, and the broker address has not been explicitly configured. More information can be found in the xref:amqp-dev-services.adoc[AMQP Dev Services Guide]. @@ -94,7 +94,7 @@ include::{generated-dir}/config/quarkus-mongodb-config-group-dev-services-build- == RabbitMQ -The RabbitMQ Dev Service will be enabled when the `quarkus-smallrye-reactive-messaging-rabbitmq` extension is present in your application, and +The RabbitMQ Dev Service will be enabled when the `quarkus-messaging-rabbitmq` extension is present in your application, and the broker address has not been explicitly configured. More information can be found in the xref:rabbitmq-dev-services.adoc[RabbitMQ Dev Services Guide]. @@ -102,7 +102,7 @@ include::{generated-dir}/config/quarkus-smallrye-reactivemessaging-rabbitmq-conf == Pulsar -The Pulsar Dev Service will be enabled when the `quarkus-smallrye-reactive-messaging-pulsar` extension is present in your application, and +The Pulsar Dev Service will be enabled when the `quarkus-messaging-pulsar` extension is present in your application, and the broker address has not been explicitly configured. More information can be found in the xref:pulsar-dev-services.adoc[Pulsar Dev Services Guide]. diff --git a/docs/src/main/asciidoc/kafka-dev-services.adoc b/docs/src/main/asciidoc/kafka-dev-services.adoc index 0382a8f3209ae..2937185d7bfe3 100644 --- a/docs/src/main/asciidoc/kafka-dev-services.adoc +++ b/docs/src/main/asciidoc/kafka-dev-services.adoc @@ -8,9 +8,9 @@ include::_attributes.adoc[] :categories: messaging :summary: Start Apache Kafka automatically in dev and test modes. :topics: messaging,kafka,dev-services,testing,dev-mode -:extensions: io.quarkus:quarkus-kafka-client,io.quarkus:quarkus-smallrye-reactive-messaging-kafka +:extensions: io.quarkus:quarkus-kafka-client,io.quarkus:quarkus-messaging-kafka -If any Kafka-related extension is present (e.g. `quarkus-smallrye-reactive-messaging-kafka`), Dev Services for Kafka automatically starts a Kafka broker in dev mode and when running tests. +If any Kafka-related extension is present (e.g. `quarkus-messaging-kafka`), Dev Services for Kafka automatically starts a Kafka broker in dev mode and when running tests. So, you don't have to start a broker manually. The application is configured automatically. diff --git a/docs/src/main/asciidoc/kafka-dev-ui.adoc b/docs/src/main/asciidoc/kafka-dev-ui.adoc index 90cf6335f6961..230cac7810e53 100644 --- a/docs/src/main/asciidoc/kafka-dev-ui.adoc +++ b/docs/src/main/asciidoc/kafka-dev-ui.adoc @@ -8,9 +8,9 @@ include::_attributes.adoc[] :categories: messaging :summary: Dev UI extension for Apache Kafka for development purposes. :topics: messaging,kafka,dev-ui,dev-mode -:extensions: io.quarkus:quarkus-kafka-client,io.quarkus:quarkus-smallrye-reactive-messaging-kafka +:extensions: io.quarkus:quarkus-kafka-client,io.quarkus:quarkus-messaging-kafka -If any Kafka-related extension is present (e.g. `quarkus-smallrye-reactive-messaging-kafka`), +If any Kafka-related extension is present (e.g. `quarkus-messaging-kafka`), the Quarkus Dev UI is extended with a Kafka broker management UI. It is connected automatically to the Kafka broker configured for the application. diff --git a/docs/src/main/asciidoc/kafka-reactive-getting-started.adoc b/docs/src/main/asciidoc/kafka-getting-started.adoc similarity index 97% rename from docs/src/main/asciidoc/kafka-reactive-getting-started.adoc rename to docs/src/main/asciidoc/kafka-getting-started.adoc index ab03e6bfab1f0..86c795b6e7062 100644 --- a/docs/src/main/asciidoc/kafka-reactive-getting-started.adoc +++ b/docs/src/main/asciidoc/kafka-getting-started.adoc @@ -3,14 +3,14 @@ This guide is maintained in the main Quarkus repository and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// -= Getting Started to SmallRye Reactive Messaging with Apache Kafka += Getting Started to Quarkus Messaging with Apache Kafka include::_attributes.adoc[] :categories: messaging -:summary: This guide demonstrates how your Quarkus application can utilize SmallRye Reactive Messaging to interact with Apache Kafka. +:summary: This guide demonstrates how your Quarkus application can utilize Quarkus Messaging to interact with Apache Kafka. :topics: messaging,kafka,reactive-messaging -:extensions: io.quarkus:quarkus-smallrye-reactive-messaging-kafka +:extensions: io.quarkus:quarkus-messaging-kafka -This guide demonstrates how your Quarkus application can utilize SmallRye Reactive Messaging to interact with Apache Kafka. +This guide demonstrates how your Quarkus application can utilize Quarkus Messaging to interact with Apache Kafka. == Prerequisites @@ -52,7 +52,7 @@ First, we need to create two projects: the _producer_ and the _processor_. To create the _producer_ project, in a terminal run: :create-app-artifact-id: kafka-quickstart-producer -:create-app-extensions: rest-jackson,smallrye-reactive-messaging-kafka +:create-app-extensions: rest-jackson,messaging-kafka :create-app-post-command: include::{includes}/devtools/create-app.adoc[] @@ -64,7 +64,7 @@ This command creates the project structure and selects two Quarkus extensions we To create the _processor_ project, from the same directory, run: :create-app-artifact-id: kafka-quickstart-processor -:create-app-extensions: smallrye-reactive-messaging-kafka +:create-app-extensions: messaging-kafka :create-app-post-command: include::{includes}/devtools/create-app.adoc[] @@ -507,7 +507,7 @@ For the exhaustive list of features and configuration options, check the xref:ka [NOTE] ==== -In this guide we explore Smallrye Reactive Messaging framework to interact with Apache Kafka. +In this guide we explore how we can interact with Apache Kafka using the Quarkus Messaging extensions. Quarkus extension for Kafka also allows xref:kafka.adoc#kafka-bare-clients[using Kafka clients directly]. ==== diff --git a/docs/src/main/asciidoc/kafka-schema-registry-avro.adoc b/docs/src/main/asciidoc/kafka-schema-registry-avro.adoc index 268b558c1434b..6a7766b8034fd 100644 --- a/docs/src/main/asciidoc/kafka-schema-registry-avro.adoc +++ b/docs/src/main/asciidoc/kafka-schema-registry-avro.adoc @@ -8,7 +8,7 @@ include::_attributes.adoc[] :categories: messaging :summary: Use Apache Kafka, Avro serialized records, and connect to a schema registry. :topics: messaging,kafka,apicurio,registry -:extensions: io.quarkus:quarkus-apicurio-registry-avro,io.quarkus:quarkus-smallrye-reactive-messaging-kafka +:extensions: io.quarkus:quarkus-apicurio-registry-avro,io.quarkus:quarkus-messaging-kafka This guide shows how your Quarkus application can use Apache Kafka, https://avro.apache.org/docs/current/[Avro] serialized records, and connect to a schema registry (such as the https://docs.confluent.io/platform/current/schema-registry/index.html[Confluent Schema Registry] or https://www.apicur.io/registry/[Apicurio Registry]). @@ -49,7 +49,7 @@ The solution is located in the `kafka-avro-schema-quickstart` link:{quickstarts- First, we need a new project. Create a new project with the following command: :create-app-artifact-id: kafka-avro-schema-quickstart -:create-app-extensions: rest-jackson,smallrye-reactive-messaging-kafka,apicurio-registry-avro +:create-app-extensions: rest-jackson,messaging-kafka,apicurio-registry-avro include::{includes}/devtools/create-app.adoc[] [TIP] @@ -247,7 +247,7 @@ See xref:kafka-dev-services.adoc[Dev Services for Kafka] and xref:apicurio-regis [TIP] ==== You might have noticed that we didn't configure the schema registry URL anywhere. -This is because Dev Services for Apicurio Registry configures all Kafka channels in SmallRye Reactive Messaging to use the automatically started registry instance. +This is because Dev Services for Apicurio Registry configures all Kafka channels in Quarkus Messaging to use the automatically started registry instance. Apicurio Registry, in addition to its native API, also exposes an endpoint that is API-compatible with Confluent Schema Registry. Therefore, this automatic configuration works both for Apicurio Registry serde and Confluent Schema Registry serde. diff --git a/docs/src/main/asciidoc/kafka-schema-registry-json-schema.adoc b/docs/src/main/asciidoc/kafka-schema-registry-json-schema.adoc index 88c164eabb646..63d540d191a59 100644 --- a/docs/src/main/asciidoc/kafka-schema-registry-json-schema.adoc +++ b/docs/src/main/asciidoc/kafka-schema-registry-json-schema.adoc @@ -8,7 +8,7 @@ include::_attributes.adoc[] :categories: messaging :summary: Use Apache Kafka, Json Schema serialized records, and connect to a schema registry. :topics: messaging,kafka,apicurio,registry -:extensions: io.quarkus:quarkus-apicurio-registry-json-schema,io.quarkus:quarkus-smallrye-reactive-messaging-kafka +:extensions: io.quarkus:quarkus-apicurio-registry-json-schema,io.quarkus:quarkus-messaging-kafka This guide shows how your Quarkus application can use Apache Kafka, https://json-schema.org/[JSON Schema] serialized records, and connect to a schema registry (such as the https://docs.confluent.io/platform/current/schema-registry/index.html[Confluent Schema Registry] or https://www.apicur.io/registry/[Apicurio Registry]). @@ -49,7 +49,7 @@ The solution is located in the `kafka-json-schema-quickstart` link:{quickstarts- First, we need a new project. Create a new project with the following command: :create-app-artifact-id: kafka-json-schema-quickstart -:create-app-extensions: rest-jackson,smallrye-reactive-messaging-kafka,apicurio-registry-json-schema +:create-app-extensions: rest-jackson,messaging-kafka,apicurio-registry-json-schema include::{includes}/devtools/create-app.adoc[] [TIP] @@ -167,7 +167,7 @@ To achieve this, edit the `application.properties` file, and add the following c mp.messaging.outgoing.movies.connector=smallrye-kafka # disable automatic detection of the serializers -quarkus.reactive-messaging.kafka.serializer-autodetection.enabled=false +quarkus.messaging.kafka.serializer-autodetection.enabled=false # Set the value serializer for the channel `movies` mp.messaging.outgoing.movies.value.serializer=io.apicurio.registry.serde.jsonschema.JsonSchemaKafkaSerializer @@ -275,7 +275,7 @@ See xref:kafka-dev-services.adoc[Dev Services for Kafka] and xref:apicurio-regis [TIP] ==== You might have noticed that we didn't configure the schema registry URL anywhere. -This is because Dev Services for Apicurio Registry configures all Kafka channels in SmallRye Reactive Messaging to use the automatically started registry instance. +This is because Dev Services for Apicurio Registry configures all Kafka channels in Quarkus Messaging to use the automatically started registry instance. Apicurio Registry, in addition to its native API, also exposes an endpoint that is API-compatible with Confluent Schema Registry. Therefore, this automatic configuration works both for Apicurio Registry serde and Confluent Schema Registry serde. diff --git a/docs/src/main/asciidoc/kafka-streams.adoc b/docs/src/main/asciidoc/kafka-streams.adoc index 2a9ed7cf5a7b9..db79bb2e9557e 100644 --- a/docs/src/main/asciidoc/kafka-streams.adoc +++ b/docs/src/main/asciidoc/kafka-streams.adoc @@ -87,10 +87,10 @@ include::{includes}/devtools/create-app.adoc[] This command generates a Maven project, importing the Reactive Messaging and Kafka connector extensions. -If you already have your Quarkus project configured, you can add the `smallrye-reactive-messaging-kafka` extension +If you already have your Quarkus project configured, you can add the `messaging-kafka` extension to your project by running the following command in your project base directory: -:add-extension-extensions: quarkus-smallrye-reactive-messaging-kafka +:add-extension-extensions: quarkus-messaging-kafka include::{includes}/devtools/extension-add.adoc[] This will add the following to your build file: @@ -100,14 +100,14 @@ This will add the following to your build file: ---- io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-messaging-kafka ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-smallrye-reactive-messaging-kafka") +implementation("io.quarkus:quarkus-messaging-kafka") ---- === The Temperature Value Producer diff --git a/docs/src/main/asciidoc/kafka.adoc b/docs/src/main/asciidoc/kafka.adoc index d9e913df1c87b..60509c7c861b3 100644 --- a/docs/src/main/asciidoc/kafka.adoc +++ b/docs/src/main/asciidoc/kafka.adoc @@ -6,14 +6,14 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc = Apache Kafka Reference Guide include::_attributes.adoc[] :categories: messaging -:summary: This reference guide provides an in-depth look on Apache Kafka and Smallrye Reactive Messaging framework. +:summary: This reference guide provides an in-depth look on Apache Kafka and Quarkus Messaging extensions. :numbered: :sectnums: :sectnumlevels: 4 :topics: messaging,kafka,reactive-messaging -:extensions: io.quarkus:quarkus-smallrye-reactive-messaging-kafka +:extensions: io.quarkus:quarkus-messaging-kafka -This reference guide demonstrates how your Quarkus application can utilize SmallRye Reactive Messaging to interact with Apache Kafka. +This reference guide demonstrates how your Quarkus application can utilize Quarkus Messaging to interact with Apache Kafka. == Introduction @@ -35,12 +35,12 @@ Based on Eclipse MicroProfile Reactive Messaging specification 2.0, it proposes [NOTE] ==== This guide provides an in-depth look on Apache Kafka and SmallRye Reactive Messaging framework. -For a quick start take a look at xref:kafka-reactive-getting-started.adoc[Getting Started to SmallRye Reactive Messaging with Apache Kafka]. +For a quick start take a look at xref:kafka-getting-started.adoc[Getting Started to Quarkus Messaging with Apache Kafka]. ==== -You can add the `smallrye-reactive-messaging-kafka` extensions to your project by running the following command in your project base directory: +You can add the `messaging-kafka` extension to your project by running the following command in your project base directory: -:add-extension-extensions: smallrye-reactive-messaging-kafka +:add-extension-extensions: messaging-kafka include::{includes}/devtools/extension-add.adoc[] This will add the following to your build file: @@ -50,14 +50,14 @@ This will add the following to your build file: ---- io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-messaging-kafka ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-smallrye-reactive-messaging-kafka") +implementation("io.quarkus:quarkus-messaging-kafka") ---- [NOTE] @@ -98,7 +98,7 @@ This auto-attachment can be disabled using: [source, properties] ---- -quarkus.reactive-messaging.auto-connector-attachment=false +quarkus.messaging.auto-connector-attachment=false ---- ==== @@ -1888,7 +1888,7 @@ This is described in a dedicated guide: xref:kafka-schema-registry-json-schema.a [[serialization-autodetection]] == Serializer/deserializer autodetection -When using SmallRye Reactive Messaging with Kafka (`io.quarkus:quarkus-smallrye-reactive-messaging-kafka`), Quarkus can often automatically detect the correct serializer and deserializer class. +When using Quarkus Messaging with Kafka (`io.quarkus:quarkus-messaging-kafka`), Quarkus can often automatically detect the correct serializer and deserializer class. This autodetection is based on declarations of `@Incoming` and `@Outgoing` methods, as well as injected ``@Channel``s. For example, if you declare @@ -1953,7 +1953,7 @@ The full set of types supported by the serializer/deserializer autodetection is: If a serializer/deserializer is set by configuration, it won't be replaced by the autodetection. -In case you have any issues with serializer autodetection, you can switch it off completely by setting `quarkus.reactive-messaging.kafka.serializer-autodetection.enabled=false`. +In case you have any issues with serializer autodetection, you can switch it off completely by setting `quarkus.messaging.kafka.serializer-autodetection.enabled=false`. If you find you need to do this, please file a bug in the link:https://github.com/quarkusio/quarkus/issues[Quarkus issue tracker] so we can fix whatever problem you have. [[serialization-generation]] @@ -1969,7 +1969,7 @@ This generation can be disabled using: [source, properties] ---- -quarkus.reactive-messaging.kafka.serializer-generation.enabled=false +quarkus.messaging.kafka.serializer-generation.enabled=false ---- IMPORTANT: Generation does not support collections such as `List`. @@ -3380,6 +3380,6 @@ The configuration properties necessary to access the Kafka and Schema Registry i == Going further This guide has shown how you can interact with Kafka using Quarkus. -It utilizes SmallRye Reactive Messaging to build data streaming applications. +It utilizes Quarkus Messaging to build data streaming applications. If you want to go further, check the documentation of https://smallrye.io/smallrye-reactive-messaging[SmallRye Reactive Messaging], the implementation used in Quarkus. diff --git a/docs/src/main/asciidoc/kotlin.adoc b/docs/src/main/asciidoc/kotlin.adoc index 4ba737b70e8da..eb2710ebd3347 100644 --- a/docs/src/main/asciidoc/kotlin.adoc +++ b/docs/src/main/asciidoc/kotlin.adoc @@ -492,7 +492,7 @@ The following extensions provide support for Kotlin Coroutines by allowing the u |`quarkus-rest-client` |Support is provided for REST Client interface methods -|`quarkus-smallrye-reactive-messaging` +|`quarkus-messaging` |Support is provided for Reactive messaging methods |`quarkus-scheduler` diff --git a/docs/src/main/asciidoc/messaging-virtual-threads.adoc b/docs/src/main/asciidoc/messaging-virtual-threads.adoc index 1569da634f025..afe842986ef53 100644 --- a/docs/src/main/asciidoc/messaging-virtual-threads.adoc +++ b/docs/src/main/asciidoc/messaging-virtual-threads.adoc @@ -7,7 +7,7 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc include::_attributes.adoc[] :categories: messaging :topics: messaging,kafka,reactive-messaging,virtual-threads -:extensions: io.quarkus:quarkus-smallrye-reactive-messaging-kafka +:extensions: io.quarkus:quarkus-messaging-kafka :runonvthread: https://javadoc.io/doc/io.smallrye.common/smallrye-common-annotation/latest/io/smallrye/common/annotation/RunOnVirtualThread.html :rm_blocking_annotation: https://javadoc.io/doc/io.smallrye.reactive/smallrye-reactive-messaging-api/latest/io/smallrye/reactive/messaging/annotations/Blocking.html :rm_blocking_docs: http://smallrye.io/smallrye-reactive-messaging/4.8.0/concepts/blocking/ @@ -47,14 +47,14 @@ First, make sure to have a reactive messaging extension dependency to your build ---- io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-messaging-kafka ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-smallrye-reactive-messaging-kafka") +implementation("io.quarkus:quarkus-messaging-kafka") ---- You also need to make sure that you are using Java 19 or later (we recommend 21+), this can be enforced in your `pom.xml` file with the following: diff --git a/docs/src/main/asciidoc/opentelemetry.adoc b/docs/src/main/asciidoc/opentelemetry.adoc index e202ca612b444..2a621b0c5c14f 100644 --- a/docs/src/main/asciidoc/opentelemetry.adoc +++ b/docs/src/main/asciidoc/opentelemetry.adoc @@ -597,9 +597,9 @@ public void tracedWork() { } ---- -=== SmallRye Reactive Messaging - Kafka +=== Quarkus Messaging - Kafka -When using the SmallRye Reactive Messaging extension for Kafka, +When using the Quarkus Messaging extension for Kafka, we are able to propagate the span into the Kafka Record with: [source,java] @@ -645,7 +645,7 @@ Additional exporters will be available in the Quarkiverse https://github.com/qua * https://quarkus.io/guides/resteasy-client[`quarkus-resteasy-client`] * https://quarkus.io/guides/scheduler[`quarkus-scheduler`] * https://quarkus.io/guides/smallrye-graphql[`quarkus-smallrye-graphql`] -* https://quarkus.io/extensions/io.quarkus/quarkus-smallrye-reactive-messaging[`quarkus-smallrye-reactive-messaging`] +* https://quarkus.io/extensions/io.quarkus/quarkus-messaging[`quarkus-messaging`] ** AMQP 1.0 ** RabbitMQ ** Kafka diff --git a/docs/src/main/asciidoc/pulsar-dev-services.adoc b/docs/src/main/asciidoc/pulsar-dev-services.adoc index f1f8743bceadb..6f45c5b4a4677 100644 --- a/docs/src/main/asciidoc/pulsar-dev-services.adoc +++ b/docs/src/main/asciidoc/pulsar-dev-services.adoc @@ -7,9 +7,9 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc include::_attributes.adoc[] :categories: messaging :topics: messaging,reactive-messaging,pulsar,dev-services,testing,dev-mode -:extensions: io.quarkus:quarkus-smallrye-reactive-messaging-pulsar +:extensions: io.quarkus:quarkus-messaging-pulsar -With Quarkus Smallrye Reactive Messaging Pulsar extension (`quarkus-smallrye-reactive-messaging-pulsar`) +With Quarkus Messaging Pulsar extension (`quarkus-messaging-pulsar`) Dev Services for Pulsar automatically starts a Pulsar broker in dev mode and when running tests. So, you don't have to start a broker manually. The application is configured automatically. diff --git a/docs/src/main/asciidoc/pulsar-getting-started.adoc b/docs/src/main/asciidoc/pulsar-getting-started.adoc index e4aa51ed2485f..fad78b33259ca 100644 --- a/docs/src/main/asciidoc/pulsar-getting-started.adoc +++ b/docs/src/main/asciidoc/pulsar-getting-started.adoc @@ -3,14 +3,14 @@ This guide is maintained in the main Quarkus repository and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// -= Getting Started to SmallRye Reactive Messaging with Apache Pulsar += Getting Started to Quarkus Messaging with Apache Pulsar include::_attributes.adoc[] :categories: messaging :topics: messaging,reactive-messaging,pulsar -:extensions: io.quarkus:quarkus-smallrye-reactive-messaging-pulsar -:summary: This guide demonstrates how your Quarkus application can utilize SmallRye Reactive Messaging to interact with Apache Pulsar. +:extensions: io.quarkus:quarkus-messaging-pulsar +:summary: This guide demonstrates how your Quarkus application can utilize Quarkus Messaging to interact with Apache Pulsar. -This guide demonstrates how your Quarkus application can utilize SmallRye Reactive Messaging to interact with Apache Pulsar. +This guide demonstrates how your Quarkus application can utilize Quarkus Messaging to interact with Apache Pulsar. == Prerequisites @@ -52,7 +52,7 @@ First, we need to create two projects: the _producer_ and the _processor_. To create the _producer_ project, in a terminal run: :create-app-artifact-id: pulsar-quickstart-producer -:create-app-extensions: rest-jackson,smallrye-reactive-messaging-pulsar +:create-app-extensions: rest-jackson,messaging-pulsar :create-app-post-command: include::{includes}/devtools/create-app.adoc[] @@ -64,7 +64,7 @@ This command creates the project structure and selects two Quarkus extensions we To create the _processor_ project, from the same directory, run: :create-app-artifact-id: pulsar-quickstart-processor -:create-app-extensions: smallrye-reactive-messaging-pulsar +:create-app-extensions: messaging-pulsar :create-app-post-command: include::{includes}/devtools/create-app.adoc[] @@ -509,6 +509,6 @@ For the exhaustive list of features and configuration options, check the xref:pu [NOTE] ==== -In this guide we explore Smallrye Reactive Messaging framework to interact with Apache Pulsar. +In this guide we explore how to interact with Apache Pulsar using the Quarkus Messaging extensions. xref:pulsar.adoc#configuring-pulsar-clients[using Pulsar clients directly]. ==== diff --git a/docs/src/main/asciidoc/pulsar.adoc b/docs/src/main/asciidoc/pulsar.adoc index f1888dc09a1d8..5ebbe6c71f993 100644 --- a/docs/src/main/asciidoc/pulsar.adoc +++ b/docs/src/main/asciidoc/pulsar.adoc @@ -6,14 +6,14 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc = Apache Pulsar Reference Guide include::_attributes.adoc[] :categories: messaging -:summary: This reference guide provides an in-depth look on Apache Pulsar and Smallrye Reactive Messaging framework. +:summary: This reference guide provides an in-depth look on Apache Pulsar and the Quarkus Messaging extensions. :numbered: :sectnums: :sectnumlevels: 4 :topics: messaging,reactive-messaging,pulsar -:extensions: io.quarkus:quarkus-smallrye-reactive-messaging-pulsar +:extensions: io.quarkus:quarkus-messaging-pulsar -This reference guide demonstrates how your Quarkus application can utilize SmallRye Reactive Messaging to interact with Apache Pulsar. +This reference guide demonstrates how your Quarkus application can utilize Quarkus Messaging to interact with Apache Pulsar. == Introduction @@ -41,12 +41,12 @@ Based on Eclipse MicroProfile Reactive Messaging specification 3.0, it proposes [NOTE] ==== This guide provides an in-depth look on Apache Pulsar and SmallRye Reactive Messaging framework. -For a quick start take a look at xref:pulsar-getting-started.adoc[Getting Started to SmallRye Reactive Messaging with Apache Pulsar]. +For a quick start take a look at xref:pulsar-getting-started.adoc[Getting Started to Quarkus Messaging with Apache Pulsar]. ==== -You can add the `smallrye-reactive-messaging-pulsar` extensions to your project by running the following command in your project base directory: +You can add the `messaging-pulsar` extensions to your project by running the following command in your project base directory: -:add-extension-extensions: smallrye-reactive-messaging-pulsar +:add-extension-extensions: messaging-pulsar include::{includes}/devtools/extension-add.adoc[] This will add the following to your build file: @@ -56,14 +56,14 @@ This will add the following to your build file: ---- io.quarkus - quarkus-smallrye-reactive-messaging-pulsar + quarkus-messaging-pulsar ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-smallrye-reactive-messaging-pulsar") +implementation("io.quarkus:quarkus-messaging-pulsar") ---- [NOTE] @@ -71,9 +71,9 @@ implementation("io.quarkus:quarkus-smallrye-reactive-messaging-pulsar") The extension includes `pulsar-clients-original` version 3.0.0 as a transitive dependency and is compatible with Pulsar brokers version 2.10.x. ==== -== Configuring Smallrye Pulsar Connector +== Configuring SmallRye Pulsar Connector -Because Smallrye Reactive Messaging framework supports different messaging backends like Apache Kafka, Apache Pulsar, AMQP, Apache Camel, JMS, MQTT, etc., it employs a generic vocabulary: +Because SmallRye Reactive Messaging framework supports different messaging backends like Apache Kafka, Apache Pulsar, AMQP, Apache Camel, JMS, MQTT, etc., it employs a generic vocabulary: - Applications send and receive *messages*. https://javadoc.io/doc/io.smallrye.reactive/smallrye-reactive-messaging-api/latest/org/eclipse/microprofile/reactive/messaging/Message.html[`Message`] wraps a _payload_ and can be extended with some _metadata_. This should not be confused with a Pulsar https://javadoc.io/doc/org.apache.pulsar/pulsar-client-api/latest/org/apache/pulsar/client/api/Message.html[`Message`], which consists of value, key @@ -113,7 +113,7 @@ This auto-attachment can be disabled using: [source, properties] ---- -quarkus.reactive-messaging.auto-connector-attachment=false +quarkus.messaging.auto-connector-attachment=false ---- ==== @@ -883,7 +883,7 @@ If no schema information is provided incoming channels will use `Schema.AUTO_CON === Auto Schema Discovery -When using SmallRye Reactive Messaging Pulsar (`io.quarkus:quarkus-smallrye-reactive-messaging-pulsar`), Quarkus can often automatically detect the correct Pulsar Schema to configure. +When using Quarkus Messaging Pulsar (`io.quarkus:quarkus-messaging-pulsar`), Quarkus can often automatically detect the correct Pulsar Schema to configure. This autodetection is based on declarations of `@Incoming` and `@Outgoing` methods, as well as injected ``@Channel``s. For example, if you declare @@ -955,7 +955,7 @@ a Schema will be generated using the Jackson `ObjectMapper`, without enforcing a If a `schema` is set by configuration, it won't be replaced by the auto-detection. -In case you have any issues with serializer auto-detection, you can switch it off completely by setting `quarkus.reactive-messaging.pulsar.serializer-autodetection.enabled=false`. +In case you have any issues with serializer auto-detection, you can switch it off completely by setting `quarkus.messaging.pulsar.serializer-autodetection.enabled=false`. If you find you need to do this, please file a bug in the link:https://github.com/quarkusio/quarkus/issues[Quarkus issue tracker] so we can fix whatever problem you have. [[pulsar-dev-services]] @@ -1311,6 +1311,6 @@ Configuration properties not configurable in configuration files (non-serializab == Going further This guide has shown how you can interact with Pulsar using Quarkus. -It utilizes SmallRye Reactive Messaging to build data streaming applications. +It utilizes Quarkus Messaging to build data streaming applications. If you want to go further, check the documentation of https://smallrye.io/smallrye-reactive-messaging[SmallRye Reactive Messaging], the implementation used in Quarkus. diff --git a/docs/src/main/asciidoc/rabbitmq-dev-services.adoc b/docs/src/main/asciidoc/rabbitmq-dev-services.adoc index cf416e7ba075c..7a6fd2870814a 100644 --- a/docs/src/main/asciidoc/rabbitmq-dev-services.adoc +++ b/docs/src/main/asciidoc/rabbitmq-dev-services.adoc @@ -7,7 +7,7 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc include::_attributes.adoc[] :categories: messaging :topics: messaging,reactive-messaging,rabbitmq,dev-services,testing,dev-mode -:extensions: io.quarkus:quarkus-smallrye-reactive-messaging-rabbitmq +:extensions: io.quarkus:quarkus-messaging-rabbitmq Dev Services for RabbitMQ automatically starts a RabbitMQ broker in dev mode and when running tests. So, you don't have to start a broker manually. diff --git a/docs/src/main/asciidoc/rabbitmq-reference.adoc b/docs/src/main/asciidoc/rabbitmq-reference.adoc index f8d2bda05b14e..a4bf77788ea9e 100644 --- a/docs/src/main/asciidoc/rabbitmq-reference.adoc +++ b/docs/src/main/asciidoc/rabbitmq-reference.adoc @@ -8,7 +8,7 @@ include::_attributes.adoc[] :extension-status: preview :categories: messaging :topics: messaging,reactive-messaging,rabbitmq,dev-services,testing,dev-mode -:extensions: io.quarkus:quarkus-smallrye-reactive-messaging-rabbitmq +:extensions: io.quarkus:quarkus-messaging-rabbitmq This guide is the companion from the xref:rabbitmq.adoc[Getting Started with RabbitMQ]. It explains in more details the configuration and usage of the RabbitMQ connector for reactive messaging. @@ -27,13 +27,13 @@ include::{includes}/extension-status.adoc[] == RabbitMQ connector extension -To use the connector, you need to add the `quarkus-smallrye-reactive-messaging-rabbitmq` extension. +To use the connector, you need to add the `quarkus-messaging-rabbitmq` extension. You can add the extension to your project using: [source, bash] ---- -> ./mvnw quarkus:add-extensions -Dextensions="quarkus-smallrye-reactive-messaging-rabbitmq" +> ./mvnw quarkus:add-extensions -Dextensions="quarkus-messaging-rabbitmq" ---- Or just add the following dependency to your project: @@ -42,7 +42,7 @@ Or just add the following dependency to your project: ---- io.quarkus - quarkus-smallrye-reactive-messaging-rabbitmq + quarkus-messaging-rabbitmq ---- diff --git a/docs/src/main/asciidoc/rabbitmq.adoc b/docs/src/main/asciidoc/rabbitmq.adoc index 5a8d023ef2cd8..7e271f83876c1 100644 --- a/docs/src/main/asciidoc/rabbitmq.adoc +++ b/docs/src/main/asciidoc/rabbitmq.adoc @@ -3,14 +3,14 @@ This guide is maintained in the main Quarkus repository and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc //// -= Getting Started to SmallRye Reactive Messaging with RabbitMQ += Getting Started to Quarkus Messaging with RabbitMQ :extension-status: preview include::_attributes.adoc[] :categories: messaging :topics: messaging,reactive-messaging,rabbitmq -:extensions: io.quarkus:quarkus-smallrye-reactive-messaging-rabbitmq +:extensions: io.quarkus:quarkus-messaging-rabbitmq -This guide demonstrates how your Quarkus application can utilize SmallRye Reactive Messaging to interact with RabbitMQ. +This guide demonstrates how your Quarkus application can utilize Quarkus Messaging to interact with RabbitMQ. include::{includes}/extension-status.adoc[] @@ -54,7 +54,7 @@ First, we need to create two projects: the _producer_ and the _processor_. To create the _producer_ project, in a terminal run: :create-app-artifact-id: rabbitmq-quickstart-producer -:create-app-extensions: smallrye-reactive-messaging-rabbitmq,rest-jackson +:create-app-extensions: messaging-rabbitmq,rest-jackson :create-app-post-command: include::{includes}/devtools/create-app.adoc[] @@ -65,10 +65,10 @@ This command creates the project structure and select the two Quarkus extensions [TIP] ==== -If you already have your Quarkus project configured, you can add the `smallrye-reactive-messaging-rabbitmq` extension +If you already have your Quarkus project configured, you can add the `messaging-rabbitmq` extension to your project by running the following command in your project base directory: -:add-extension-extensions: smallrye-reactive-messaging-rabbitmq +:add-extension-extensions: messaging-rabbitmq include::{includes}/devtools/extension-add.adoc[] This will add the following to your `pom.xml`: @@ -78,21 +78,21 @@ This will add the following to your `pom.xml`: ---- io.quarkus - quarkus-smallrye-reactive-messaging-rabbitmq + quarkus-messaging-rabbitmq ---- [source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"] .build.gradle ---- -implementation("io.quarkus:quarkus-smallrye-reactive-messaging-rabbitmq") +implementation("io.quarkus:quarkus-messaging-rabbitmq") ---- ==== To create the _processor_ project, from the same directory, run: :create-app-artifact-id: rabbitmq-quickstart-processor -:create-app-extensions: smallrye-reactive-messaging-rabbitmq +:create-app-extensions: messaging-rabbitmq :create-app-post-command: include::{includes}/devtools/create-app.adoc[] diff --git a/docs/src/main/asciidoc/rest-client.adoc b/docs/src/main/asciidoc/rest-client.adoc index db4a80fc9b8b0..434d1a03f6322 100644 --- a/docs/src/main/asciidoc/rest-client.adoc +++ b/docs/src/main/asciidoc/rest-client.adoc @@ -417,6 +417,18 @@ public ClientMultipartForm buildClientMultipartForm(MultiPartPayloadFormData inp <2> Adding attribute `jsonPayload` directly to `ClientMultipartForm` <3> Adding `FileUpload` objects to `ClientMultipartForm` as binaryFileUpload with contentType. +=== Sending large payloads + +The REST Client is capable of sending arbitrarily large HTTP bodies without buffering the contents in memory, if one of the following types is used: + +* `InputStream` +* `Multi` + +Furthermore, the client can also send arbitrarily large files if one of the following types is used: + +* `File` +* `Path` + == Create the configuration diff --git a/docs/src/main/asciidoc/resteasy-client.adoc b/docs/src/main/asciidoc/resteasy-client.adoc index f04039cf50afb..a7df076880ee6 100644 --- a/docs/src/main/asciidoc/resteasy-client.adoc +++ b/docs/src/main/asciidoc/resteasy-client.adoc @@ -358,7 +358,7 @@ One important note is that according to the https://www.rfc-editor.org/rfc/rfc26 == Async Support The rest client supports asynchronous rest calls. -Async support comes in 2 flavors: you can return a `CompletionStage` or a `Uni` (requires the `quarkus-rest-client-mutiny` extension). +Async support comes in 2 flavors: you can return a `CompletionStage` or a `Uni` (requires the `quarkus-resteasy-client-mutiny` extension). Let's see it in action by adding a `getByIdAsync` method in our `ExtensionsService` REST interface. The code should look like: [source, java] diff --git a/docs/src/main/asciidoc/security-openid-connect-multitenancy.adoc b/docs/src/main/asciidoc/security-openid-connect-multitenancy.adoc index 409e396fa9d31..7506ef803694d 100644 --- a/docs/src/main/asciidoc/security-openid-connect-multitenancy.adoc +++ b/docs/src/main/asciidoc/security-openid-connect-multitenancy.adoc @@ -597,8 +597,9 @@ When you set multiple tenant configurations in the `application.properties` file To configure the resolution of the tenant identifier, use one of the following options: * <> -* <> * <> +* <> +* <> These tenant resolution options are tried in the order they are listed until the tenant id gets resolved. If the tenant id remains unresolved (`null`), the default (unnamed) tenant configuration is selected. @@ -646,46 +647,6 @@ public class CustomTenantResolver implements TenantResolver { In this example, the value of the last request path segment is a tenant id, but if required, you can implement a more complex tenant identifier resolution logic. -[[default-tenant-resolver]] -=== Default resolution - -The default resolution for a tenant identifier is convention based, whereby the authentication request must include the tenant identifier in the last segment of the request path. - -The following `application.properties` example shows how you can configure two tenants named `google` and `github`: - -[source,properties] ----- -# Tenant 'google' configuration -quarkus.oidc.google.provider=google -quarkus.oidc.google.client-id=${google-client-id} -quarkus.oidc.google.credentials.secret=${google-client-secret} -quarkus.oidc.google.authentication.redirect-path=/signed-in - -# Tenant 'github' configuration -quarkus.oidc.github.provider=google -quarkus.oidc.github.client-id=${github-client-id} -quarkus.oidc.github.credentials.secret=${github-client-secret} -quarkus.oidc.github.authentication.redirect-path=/signed-in ----- - -In the provided example, both tenants configure OIDC `web-app` applications to use an authorization code flow to authenticate users and require session cookies to be generated after authentication. -After Google or GitHub authenticates the current user, the user gets returned to the `/signed-in` area for authenticated users, such as a secured resource path on the JAX-RS endpoint. - -Finally, to complete the default tenant resolution, set the following configuration property: - -[source,properties] ----- -quarkus.http.auth.permission.login.paths=/google,/github -quarkus.http.auth.permission.login.policy=authenticated ----- - -If the endpoint is running on `http://localhost:8080`, you can also provide UI options for users to log in to either `http://localhost:8080/google` or `http://localhost:8080/github`, without having to add specific `/google` or `/github` JAX-RS resource paths. -Tenant identifiers are also recorded in the session cookie names after the authentication is completed. -Therefore, authenticated users can access the secured application area without requiring either the `google` or `github` path values to be included in the secured URL. - -Default resolution can also work for Bearer token authentication. -Still, it might be less practical because a tenant identifier must always be set as the last path segment value. - [[annotations-tenant-resolver]] === Resolve with annotations @@ -737,6 +698,64 @@ quarkus.http.auth.permission.authenticated.applies-to=JAXRS <1> ---- <1> Tell Quarkus to run the HTTP permission check after the tenant has been selected with the `@Tenant` annotation. +[[configuration-based-tenant-resolver]] +=== Resolve with configuration + +You can use the `quarkus.oidc.tenant-paths` configuration property for resolving the tenant identifier as an alternative to using `io.quarkus.oidc.TenantResolver`. +Here is how you can select the `hr` tenant for the `sayHello` endpoint of the `HelloResource` resource used in the previous example: + +[source,properties] +---- +quarkus.oidc.hr.tenant-paths=/api/hello <1> +quarkus.oidc.google.tenant-paths=/api/* <2> +quarkus.oidc.google.tenant-paths=/*/hello <3> +---- +<1> Same path-matching rules apply as for the `quarkus.http.auth.permission.authenticated.paths=/api/hello` configuration property from the previous example. +<2> The wildcard placed at the end of the path represents any number of path segments. However the path is less specific than the `/api/hello`, therefore the `hr` tenant will be used to secure the `sayHello` endpoint. +<3> The wildcard in the `/*/hello` represents exactly one path segment. Nevertheless, the wildcard is less specific than the `api`, therefore the `hr` tenant will be used. + +TIP: Path-matching mechanism works exactly same as in the xref:security-authorize-web-endpoints-reference.adoc#authorization-using-configuration[Authorization using configuration]. + +[[default-tenant-resolver]] +=== Default resolution + +The default resolution for a tenant identifier is convention based, whereby the authentication request must include the tenant identifier in the last segment of the request path. + +The following `application.properties` example shows how you can configure two tenants named `google` and `github`: + +[source,properties] +---- +# Tenant 'google' configuration +quarkus.oidc.google.provider=google +quarkus.oidc.google.client-id=${google-client-id} +quarkus.oidc.google.credentials.secret=${google-client-secret} +quarkus.oidc.google.authentication.redirect-path=/signed-in + +# Tenant 'github' configuration +quarkus.oidc.github.provider=google +quarkus.oidc.github.client-id=${github-client-id} +quarkus.oidc.github.credentials.secret=${github-client-secret} +quarkus.oidc.github.authentication.redirect-path=/signed-in +---- + +In the provided example, both tenants configure OIDC `web-app` applications to use an authorization code flow to authenticate users and require session cookies to be generated after authentication. +After Google or GitHub authenticates the current user, the user gets returned to the `/signed-in` area for authenticated users, such as a secured resource path on the JAX-RS endpoint. + +Finally, to complete the default tenant resolution, set the following configuration property: + +[source,properties] +---- +quarkus.http.auth.permission.login.paths=/google,/github +quarkus.http.auth.permission.login.policy=authenticated +---- + +If the endpoint is running on `http://localhost:8080`, you can also provide UI options for users to log in to either `http://localhost:8080/google` or `http://localhost:8080/github`, without having to add specific `/google` or `/github` JAX-RS resource paths. +Tenant identifiers are also recorded in the session cookie names after the authentication is completed. +Therefore, authenticated users can access the secured application area without requiring either the `google` or `github` path values to be included in the secured URL. + +Default resolution can also work for Bearer token authentication. +Still, it might be less practical because a tenant identifier must always be set as the last path segment value. + [[tenant-config-resolver]] == Dynamic tenant configuration resolution diff --git a/docs/src/main/asciidoc/telemetry-micrometer.adoc b/docs/src/main/asciidoc/telemetry-micrometer.adoc index 22bcce923ddea..e88295d9afb9f 100644 --- a/docs/src/main/asciidoc/telemetry-micrometer.adoc +++ b/docs/src/main/asciidoc/telemetry-micrometer.adoc @@ -751,7 +751,7 @@ Refer to the xref:./management-interface-reference.adoc[management interface ref * https://quarkus.io/guides/resteasy-client[`quarkus-resteasy-client`] * https://quarkus.io/guides/scheduler[`quarkus-scheduler`] * https://quarkus.io/guides/smallrye-graphql[`quarkus-smallrye-graphql`] -* https://quarkus.io/extensions/io.quarkus/quarkus-smallrye-reactive-messaging[`quarkus-smallrye-reactive-messaging`] +* https://quarkus.io/extensions/io.quarkus/quarkus-messaging[`quarkus-messaging`] ** AMQP 1.0 ** RabbitMQ ** Kafka diff --git a/docs/src/main/asciidoc/vertx-reference.adoc b/docs/src/main/asciidoc/vertx-reference.adoc index 88f5105834800..70f8cbf3e3f4e 100644 --- a/docs/src/main/asciidoc/vertx-reference.adoc +++ b/docs/src/main/asciidoc/vertx-reference.adoc @@ -83,8 +83,8 @@ Check the associated documentation to learn how to use them. |Documentation |AMQP Client -|`io.quarkus:quarkus-smallrye-reactive-messaging-amqp` (extension) -|xref:amqp.adoc[Getting Started to SmallRye Reactive Messaging with AMQP] +|`io.quarkus:quarkus-messaging-amqp` (extension) +|xref:amqp.adoc[Getting Started to Quarkus Messaging with AMQP] |Circuit Breaker |`io.smallrye.reactive:smallrye-mutiny-vertx-circuit-breaker` (external dependency) @@ -99,7 +99,7 @@ Check the associated documentation to learn how to use them. |xref:reactive-sql-clients.adoc[Reactive SQL Clients] |Kafka Client -|`io.quarkus:quarkus-smallrye-reactive-messaging-kafka` (extension) +|`io.quarkus:quarkus-messaging-kafka` (extension) |xref:kafka.adoc[Apache Kafka Reference Guide] |Mail Client @@ -107,7 +107,7 @@ Check the associated documentation to learn how to use them. |xref:mailer.adoc[Sending emails using SMTP] |MQTT Client -|`io.quarkus:quarkus-smallrye-reactive-messaging-mqtt` (extension) +|`io.quarkus:quarkus-messaging-mqtt` (extension) |No guide yet |MS SQL Client diff --git a/extensions/keycloak-admin-client-common/deployment/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientBuildTimeConfig.java b/extensions/keycloak-admin-client-common/deployment/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientBuildTimeConfig.java index b5ec6844d7dfc..7a2ff95e2bbfe 100644 --- a/extensions/keycloak-admin-client-common/deployment/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientBuildTimeConfig.java +++ b/extensions/keycloak-admin-client-common/deployment/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientBuildTimeConfig.java @@ -1,19 +1,21 @@ package io.quarkus.keycloak.admin.client.common; -import io.quarkus.runtime.annotations.ConfigItem; import io.quarkus.runtime.annotations.ConfigPhase; import io.quarkus.runtime.annotations.ConfigRoot; +import io.smallrye.config.ConfigMapping; +import io.smallrye.config.WithDefault; /** * Keycloak Admin Client */ -@ConfigRoot(phase = ConfigPhase.BUILD_TIME, name = "keycloak.admin-client") -public class KeycloakAdminClientBuildTimeConfig { +@ConfigMapping(prefix = "quarkus.keycloak.admin-client") +@ConfigRoot(phase = ConfigPhase.BUILD_TIME) +public interface KeycloakAdminClientBuildTimeConfig { /** * Set to true if Keycloak Admin Client injection is supported. */ - @ConfigItem(defaultValue = "true") - public boolean enabled = true; + @WithDefault("true") + boolean enabled(); } diff --git a/extensions/keycloak-admin-client-common/deployment/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientInjectionEnabled.java b/extensions/keycloak-admin-client-common/deployment/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientInjectionEnabled.java index e54415d36e119..e94bbbfdd8e4b 100644 --- a/extensions/keycloak-admin-client-common/deployment/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientInjectionEnabled.java +++ b/extensions/keycloak-admin-client-common/deployment/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientInjectionEnabled.java @@ -8,6 +8,6 @@ public class KeycloakAdminClientInjectionEnabled implements BooleanSupplier { @Override public boolean getAsBoolean() { - return config.enabled; + return config.enabled(); } } diff --git a/extensions/keycloak-admin-client-common/deployment/src/test/java/io/quarkus/keycloak/admin/client/common/ConfigValidationTest.java b/extensions/keycloak-admin-client-common/deployment/src/test/java/io/quarkus/keycloak/admin/client/common/ConfigValidationTest.java index fb33345a4f1bb..b13085a943fd2 100644 --- a/extensions/keycloak-admin-client-common/deployment/src/test/java/io/quarkus/keycloak/admin/client/common/ConfigValidationTest.java +++ b/extensions/keycloak-admin-client-common/deployment/src/test/java/io/quarkus/keycloak/admin/client/common/ConfigValidationTest.java @@ -16,14 +16,14 @@ public void passwordGrantTypeTest() { // username is required Assertions.assertThrows(KeycloakAdminClientConfigUtil.KeycloakAdminClientException.class, () -> { - KeycloakAdminClientConfig config = createConfig(); + KeycloakAdminClientConfigImpl config = createConfig(); config.username = Optional.empty(); validate(config); }); // password is required Assertions.assertThrows(KeycloakAdminClientConfigUtil.KeycloakAdminClientException.class, () -> { - KeycloakAdminClientConfig config = createConfig(); + KeycloakAdminClientConfigImpl config = createConfig(); config.password = Optional.empty(); validate(config); }); @@ -36,14 +36,14 @@ public void clientCredentialsGrantTypeTest() { // client secret is required Assertions.assertThrows(KeycloakAdminClientConfigUtil.KeycloakAdminClientException.class, () -> { - KeycloakAdminClientConfig config = createClientCredentialsConfig(); + KeycloakAdminClientConfigImpl config = createClientCredentialsConfig(); config.clientSecret = Optional.empty(); validate(config); }); } - private KeycloakAdminClientConfig createConfig() { - final KeycloakAdminClientConfig config = new KeycloakAdminClientConfig(); + private KeycloakAdminClientConfigImpl createConfig() { + final KeycloakAdminClientConfigImpl config = new KeycloakAdminClientConfigImpl(); config.serverUrl = Optional.of("https://localhost:8081"); config.grantType = KeycloakAdminClientConfig.GrantType.PASSWORD; config.clientId = "client id"; @@ -55,8 +55,8 @@ private KeycloakAdminClientConfig createConfig() { return config; } - private KeycloakAdminClientConfig createClientCredentialsConfig() { - final KeycloakAdminClientConfig config = createConfig(); + private KeycloakAdminClientConfigImpl createClientCredentialsConfig() { + final KeycloakAdminClientConfigImpl config = createConfig(); config.grantType = KeycloakAdminClientConfig.GrantType.CLIENT_CREDENTIALS; config.password = Optional.empty(); config.username = Optional.empty(); @@ -64,4 +64,56 @@ private KeycloakAdminClientConfig createClientCredentialsConfig() { return config; } + private static final class KeycloakAdminClientConfigImpl implements KeycloakAdminClientConfig { + + private Optional password; + private Optional username; + private Optional clientSecret; + private Optional scope; + private Optional serverUrl; + private String realm; + private String clientId; + private KeycloakAdminClientConfig.GrantType grantType; + + @Override + public Optional serverUrl() { + return serverUrl; + } + + @Override + public String realm() { + return realm; + } + + @Override + public String clientId() { + return clientId; + } + + @Override + public Optional clientSecret() { + return clientSecret; + } + + @Override + public Optional username() { + return username; + } + + @Override + public Optional password() { + return password; + } + + @Override + public Optional scope() { + return scope; + } + + @Override + public GrantType grantType() { + return grantType; + } + } + } diff --git a/extensions/keycloak-admin-client-common/runtime/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientConfig.java b/extensions/keycloak-admin-client-common/runtime/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientConfig.java index 9d66cf9d8482b..df54a9515992c 100644 --- a/extensions/keycloak-admin-client-common/runtime/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientConfig.java +++ b/extensions/keycloak-admin-client-common/runtime/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientConfig.java @@ -2,15 +2,17 @@ import java.util.Optional; -import io.quarkus.runtime.annotations.ConfigItem; import io.quarkus.runtime.annotations.ConfigPhase; import io.quarkus.runtime.annotations.ConfigRoot; +import io.smallrye.config.ConfigMapping; +import io.smallrye.config.WithDefault; /** * Keycloak Admin Client */ -@ConfigRoot(phase = ConfigPhase.RUN_TIME, name = "keycloak.admin-client") -public class KeycloakAdminClientConfig { +@ConfigMapping(prefix = "quarkus.keycloak.admin-client") +@ConfigRoot(phase = ConfigPhase.RUN_TIME) +public interface KeycloakAdminClientConfig { /** * Keycloak server URL, for example, `https://host:port`. @@ -18,52 +20,49 @@ public class KeycloakAdminClientConfig { * {@linkplain org.keycloak.admin.client.KeycloakBuilder} * to create it instead. */ - @ConfigItem - public Optional serverUrl; + Optional serverUrl(); /** * Realm. */ - @ConfigItem(defaultValue = "master") - public String realm; + @WithDefault("master") + String realm(); /** * Client id. */ - @ConfigItem(defaultValue = "admin-cli") - public String clientId; + @WithDefault("admin-cli") + String clientId(); /** * Client secret. Required with a `client_credentials` grant type. */ - @ConfigItem - public Optional clientSecret; + Optional clientSecret(); /** * Username. Required with a `password` grant type. */ - @ConfigItem(defaultValue = "admin") - public Optional username; + @WithDefault("admin") + Optional username(); /** * Password. Required with a `password` grant type. */ - @ConfigItem(defaultValue = "admin") - public Optional password; + @WithDefault("admin") + Optional password(); /** * OAuth 2.0 Access Token Scope. */ - @ConfigItem - public Optional scope; + Optional scope(); /** * OAuth Grant Type. */ - @ConfigItem(defaultValue = "PASSWORD") - public GrantType grantType; + @WithDefault("PASSWORD") + GrantType grantType(); - public enum GrantType { + enum GrantType { PASSWORD, CLIENT_CREDENTIALS; diff --git a/extensions/keycloak-admin-client-common/runtime/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientConfigUtil.java b/extensions/keycloak-admin-client-common/runtime/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientConfigUtil.java index a32b4bf82f2da..79c2191222f01 100644 --- a/extensions/keycloak-admin-client-common/runtime/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientConfigUtil.java +++ b/extensions/keycloak-admin-client-common/runtime/src/main/java/io/quarkus/keycloak/admin/client/common/KeycloakAdminClientConfigUtil.java @@ -13,7 +13,7 @@ public class KeycloakAdminClientConfigUtil { */ public static void validate(KeycloakAdminClientConfig config) { - if (config.serverUrl.isEmpty()) { + if (config.serverUrl().isEmpty()) { LOG.debug( "Configuration property 'server-url' is not set, 'Keycloak' admin client injection will fail, " + "use org.keycloak.admin.client.KeycloakBuilder to create it instead"); @@ -21,12 +21,12 @@ public static void validate(KeycloakAdminClientConfig config) { } // client id is also required in both cases, but since it's not nullable, we can skip its validation - if (config.grantType == PASSWORD) { - if (config.password.isEmpty() || config.username.isEmpty()) { + if (config.grantType() == PASSWORD) { + if (config.password().isEmpty() || config.username().isEmpty()) { throw new KeycloakAdminClientException("grant type 'password' requires username and password"); } } else { - if (config.clientSecret.isEmpty()) { + if (config.clientSecret().isEmpty()) { throw new KeycloakAdminClientException("grant type 'client_credentials' requires client secret"); } } diff --git a/extensions/keycloak-admin-rest-client/runtime/src/main/java/io/quarkus/keycloak/admin/client/reactive/runtime/ResteasyReactiveKeycloakAdminClientRecorder.java b/extensions/keycloak-admin-rest-client/runtime/src/main/java/io/quarkus/keycloak/admin/client/reactive/runtime/ResteasyReactiveKeycloakAdminClientRecorder.java index 12458c795592f..99ac6853cc730 100644 --- a/extensions/keycloak-admin-rest-client/runtime/src/main/java/io/quarkus/keycloak/admin/client/reactive/runtime/ResteasyReactiveKeycloakAdminClientRecorder.java +++ b/extensions/keycloak-admin-rest-client/runtime/src/main/java/io/quarkus/keycloak/admin/client/reactive/runtime/ResteasyReactiveKeycloakAdminClientRecorder.java @@ -29,7 +29,7 @@ public Supplier createAdminClient() { final KeycloakAdminClientConfig config = keycloakAdminClientConfigRuntimeValue.getValue(); validate(config); - if (config.serverUrl.isEmpty()) { + if (config.serverUrl().isEmpty()) { return new Supplier<>() { @Override public Keycloak get() { @@ -40,14 +40,14 @@ public Keycloak get() { } final KeycloakBuilder keycloakBuilder = KeycloakBuilder .builder() - .clientId(config.clientId) - .clientSecret(config.clientSecret.orElse(null)) - .grantType(config.grantType.asString()) - .username(config.username.orElse(null)) - .password(config.password.orElse(null)) - .realm(config.realm) - .serverUrl(config.serverUrl.get()) - .scope(config.scope.orElse(null)); + .clientId(config.clientId()) + .clientSecret(config.clientSecret().orElse(null)) + .grantType(config.grantType().asString()) + .username(config.username().orElse(null)) + .password(config.password().orElse(null)) + .realm(config.realm()) + .serverUrl(config.serverUrl().get()) + .scope(config.scope().orElse(null)); return new Supplier() { @Override public Keycloak get() { diff --git a/extensions/keycloak-admin-resteasy-client/runtime/src/main/java/io/quarkus/keycloak/adminclient/ResteasyKeycloakAdminClientRecorder.java b/extensions/keycloak-admin-resteasy-client/runtime/src/main/java/io/quarkus/keycloak/adminclient/ResteasyKeycloakAdminClientRecorder.java index 0ded9fe8b5307..c611ace358c01 100644 --- a/extensions/keycloak-admin-resteasy-client/runtime/src/main/java/io/quarkus/keycloak/adminclient/ResteasyKeycloakAdminClientRecorder.java +++ b/extensions/keycloak-admin-resteasy-client/runtime/src/main/java/io/quarkus/keycloak/adminclient/ResteasyKeycloakAdminClientRecorder.java @@ -35,7 +35,7 @@ public Supplier createAdminClient() { final KeycloakAdminClientConfig config = keycloakAdminClientConfigRuntimeValue.getValue(); validate(config); - if (config.serverUrl.isEmpty()) { + if (config.serverUrl().isEmpty()) { return new Supplier<>() { @Override public Keycloak get() { @@ -46,14 +46,14 @@ public Keycloak get() { } final KeycloakBuilder keycloakBuilder = KeycloakBuilder .builder() - .clientId(config.clientId) - .clientSecret(config.clientSecret.orElse(null)) - .grantType(config.grantType.asString()) - .username(config.username.orElse(null)) - .password(config.password.orElse(null)) - .realm(config.realm) - .serverUrl(config.serverUrl.get()) - .scope(config.scope.orElse(null)); + .clientId(config.clientId()) + .clientSecret(config.clientSecret().orElse(null)) + .grantType(config.grantType().asString()) + .username(config.username().orElse(null)) + .password(config.password().orElse(null)) + .realm(config.realm()) + .serverUrl(config.serverUrl().get()) + .scope(config.scope().orElse(null)); return new Supplier() { @Override public Keycloak get() { diff --git a/extensions/oidc-client-filter/deployment/src/main/java/io/quarkus/oidc/client/filter/deployment/OidcClientFilterBuildStep.java b/extensions/oidc-client-filter/deployment/src/main/java/io/quarkus/oidc/client/filter/deployment/OidcClientFilterBuildStep.java index f92a7ec8837b5..a45ac5d2e6804 100644 --- a/extensions/oidc-client-filter/deployment/src/main/java/io/quarkus/oidc/client/filter/deployment/OidcClientFilterBuildStep.java +++ b/extensions/oidc-client-filter/deployment/src/main/java/io/quarkus/oidc/client/filter/deployment/OidcClientFilterBuildStep.java @@ -47,7 +47,7 @@ void registerProvider(BuildProducer additionalBeans, final Set namedFilterClientClasses = namedOidcClientFilterBuildItem.namedFilterClientClasses; // register default request filter provider against the rest of the clients (client != namedFilterClientClasses) - if (config.registerFilter) { + if (config.registerFilter()) { if (namedFilterClientClasses.isEmpty()) { // register default request filter as global rest client provider jaxrsProviders.produce(new ResteasyJaxrsProviderBuildItem(OidcClientRequestFilter.class.getName())); @@ -101,7 +101,7 @@ NamedOidcClientFilterBuildItem registerNamedProviders(BuildProducer clientId() { - return oidcClientFilterConfig.clientName; + return oidcClientFilterConfig.clientName(); } } diff --git a/extensions/oidc-client-filter/runtime/src/main/java/io/quarkus/oidc/client/filter/runtime/OidcClientFilterConfig.java b/extensions/oidc-client-filter/runtime/src/main/java/io/quarkus/oidc/client/filter/runtime/OidcClientFilterConfig.java index 21b494935293f..e742968999b44 100644 --- a/extensions/oidc-client-filter/runtime/src/main/java/io/quarkus/oidc/client/filter/runtime/OidcClientFilterConfig.java +++ b/extensions/oidc-client-filter/runtime/src/main/java/io/quarkus/oidc/client/filter/runtime/OidcClientFilterConfig.java @@ -2,23 +2,24 @@ import java.util.Optional; -import io.quarkus.runtime.annotations.ConfigItem; import io.quarkus.runtime.annotations.ConfigPhase; import io.quarkus.runtime.annotations.ConfigRoot; +import io.smallrye.config.ConfigMapping; +import io.smallrye.config.WithDefault; -@ConfigRoot(name = "resteasy-client-oidc-filter", phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) -public class OidcClientFilterConfig { +@ConfigMapping(prefix = "quarkus.resteasy-client-oidc-filter") +@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) +public interface OidcClientFilterConfig { /** * Enable OidcClientRequestFilter for all the injected MP RestClient implementations. * If this property is disabled then OidcClientRequestFilter has to be registered as an MP RestClient provider. */ - @ConfigItem(defaultValue = "false") - public boolean registerFilter; + @WithDefault("false") + boolean registerFilter(); /** * Name of the configured OidcClient used by the OidcClientRequestFilter. You can override this configuration for * individual MP RestClient with the `io.quarkus.oidc.client.filter.OidcClientFilter` annotation. */ - @ConfigItem - public Optional clientName; + Optional clientName(); } diff --git a/extensions/oidc-client-filter/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/oidc-client-filter/runtime/src/main/resources/META-INF/quarkus-extension.yaml index cf02bb14353a5..fe65750f3d012 100644 --- a/extensions/oidc-client-filter/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/oidc-client-filter/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -13,4 +13,5 @@ metadata: - "security" status: "stable" config: + - "quarkus.resteasy-client-oidc-filter." - "quarkus.oidc-client." diff --git a/extensions/oidc-client-graphql/deployment/src/main/java/io/quarkus/oidc/client/graphql/OidcGraphQLClientIntegrationProcessor.java b/extensions/oidc-client-graphql/deployment/src/main/java/io/quarkus/oidc/client/graphql/OidcGraphQLClientIntegrationProcessor.java index 8defc7d6ba3d2..8a1ec96954db4 100644 --- a/extensions/oidc-client-graphql/deployment/src/main/java/io/quarkus/oidc/client/graphql/OidcGraphQLClientIntegrationProcessor.java +++ b/extensions/oidc-client-graphql/deployment/src/main/java/io/quarkus/oidc/client/graphql/OidcGraphQLClientIntegrationProcessor.java @@ -54,6 +54,6 @@ void initialize(BeanContainerBuildItem containerBuildItem, } } } - recorder.enhanceGraphQLClientConfigurationWithOidc(configKeysToOidcClients, config.clientName.orElse(null)); + recorder.enhanceGraphQLClientConfigurationWithOidc(configKeysToOidcClients, config.clientName().orElse(null)); } } diff --git a/extensions/oidc-client-graphql/runtime/src/main/java/io/quarkus/oidc/client/graphql/runtime/OidcClientGraphQLConfig.java b/extensions/oidc-client-graphql/runtime/src/main/java/io/quarkus/oidc/client/graphql/runtime/OidcClientGraphQLConfig.java index 7a78cd7137009..5cbd6107a73af 100644 --- a/extensions/oidc-client-graphql/runtime/src/main/java/io/quarkus/oidc/client/graphql/runtime/OidcClientGraphQLConfig.java +++ b/extensions/oidc-client-graphql/runtime/src/main/java/io/quarkus/oidc/client/graphql/runtime/OidcClientGraphQLConfig.java @@ -2,17 +2,17 @@ import java.util.Optional; -import io.quarkus.runtime.annotations.ConfigItem; import io.quarkus.runtime.annotations.ConfigPhase; import io.quarkus.runtime.annotations.ConfigRoot; +import io.smallrye.config.ConfigMapping; -@ConfigRoot(name = "oidc-client-graphql", phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) -public class OidcClientGraphQLConfig { +@ConfigMapping(prefix = "quarkus.oidc-client-graphql") +@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) +public interface OidcClientGraphQLConfig { /** * Name of the configured OidcClient used by GraphQL clients. You can override this configuration * for typesafe clients with the `io.quarkus.oidc.client.filter.OidcClientFilter` annotation. */ - @ConfigItem - public Optional clientName; + Optional clientName(); } diff --git a/extensions/oidc-client-reactive-filter/deployment/src/main/java/io/quarkus/oidc/client/reactive/filter/deployment/OidcClientReactiveFilterBuildStep.java b/extensions/oidc-client-reactive-filter/deployment/src/main/java/io/quarkus/oidc/client/reactive/filter/deployment/OidcClientReactiveFilterBuildStep.java index 1f0714185448c..38784bb7e9eb0 100644 --- a/extensions/oidc-client-reactive-filter/deployment/src/main/java/io/quarkus/oidc/client/reactive/filter/deployment/OidcClientReactiveFilterBuildStep.java +++ b/extensions/oidc-client-reactive-filter/deployment/src/main/java/io/quarkus/oidc/client/reactive/filter/deployment/OidcClientReactiveFilterBuildStep.java @@ -47,7 +47,7 @@ void oidcClientFilterSupport(CombinedIndexBuildItem indexBuildItem, BuildProduce // get client name from annotation @OidcClientFilter("clientName") final String clientName = OidcClientFilterDeploymentHelper.getClientName(instance); final AnnotationValue valueAttr; - if (clientName != null && !clientName.equals(oidcClientReactiveFilterConfig.clientName.orElse(null))) { + if (clientName != null && !clientName.equals(oidcClientReactiveFilterConfig.clientName().orElse(null))) { // create and use custom filter for named OidcClient // we generate exactly one custom filter for each named client specified through annotation valueAttr = createClassValue(helper.getOrCreateFilter(clientName)); diff --git a/extensions/oidc-client-reactive-filter/runtime/src/main/java/io/quarkus/oidc/client/reactive/filter/OidcClientRequestReactiveFilter.java b/extensions/oidc-client-reactive-filter/runtime/src/main/java/io/quarkus/oidc/client/reactive/filter/OidcClientRequestReactiveFilter.java index 1561f9be512cb..2801fcad75dc4 100644 --- a/extensions/oidc-client-reactive-filter/runtime/src/main/java/io/quarkus/oidc/client/reactive/filter/OidcClientRequestReactiveFilter.java +++ b/extensions/oidc-client-reactive-filter/runtime/src/main/java/io/quarkus/oidc/client/reactive/filter/OidcClientRequestReactiveFilter.java @@ -17,6 +17,6 @@ public class OidcClientRequestReactiveFilter extends AbstractOidcClientRequestRe @Override protected Optional clientId() { - return config.clientName; + return config.clientName(); } } diff --git a/extensions/oidc-client-reactive-filter/runtime/src/main/java/io/quarkus/oidc/client/reactive/filter/runtime/OidcClientReactiveFilterConfig.java b/extensions/oidc-client-reactive-filter/runtime/src/main/java/io/quarkus/oidc/client/reactive/filter/runtime/OidcClientReactiveFilterConfig.java index d2b8cc6eeab49..5de7169713a2c 100644 --- a/extensions/oidc-client-reactive-filter/runtime/src/main/java/io/quarkus/oidc/client/reactive/filter/runtime/OidcClientReactiveFilterConfig.java +++ b/extensions/oidc-client-reactive-filter/runtime/src/main/java/io/quarkus/oidc/client/reactive/filter/runtime/OidcClientReactiveFilterConfig.java @@ -2,17 +2,17 @@ import java.util.Optional; -import io.quarkus.runtime.annotations.ConfigItem; import io.quarkus.runtime.annotations.ConfigPhase; import io.quarkus.runtime.annotations.ConfigRoot; +import io.smallrye.config.ConfigMapping; -@ConfigRoot(name = "rest-client-oidc-filter", phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) -public class OidcClientReactiveFilterConfig { +@ConfigMapping(prefix = "quarkus.rest-client-oidc-filter") +@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) +public interface OidcClientReactiveFilterConfig { /** * Name of the configured OidcClient used by the OidcClientRequestReactiveFilter. You can override this configuration * for individual MP RestClients with the `io.quarkus.oidc.client.filter.OidcClientFilter` annotation. */ - @ConfigItem - public Optional clientName; + Optional clientName(); } diff --git a/extensions/oidc-client-reactive-filter/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/oidc-client-reactive-filter/runtime/src/main/resources/META-INF/quarkus-extension.yaml index cf22d9fc62814..170a93a2aabf9 100644 --- a/extensions/oidc-client-reactive-filter/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/oidc-client-reactive-filter/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -14,4 +14,5 @@ metadata: - "security" status: "stable" config: + - "quarkus.rest-client-oidc-filter." - "quarkus.oidc-client." diff --git a/extensions/oidc-token-propagation-reactive/deployment/src/main/java/io/quarkus/oidc/token/propagation/reactive/OidcTokenPropagationReactiveBuildStep.java b/extensions/oidc-token-propagation-reactive/deployment/src/main/java/io/quarkus/oidc/token/propagation/reactive/OidcTokenPropagationReactiveBuildStep.java index 37955afd1201a..dd3d07c7d11bd 100644 --- a/extensions/oidc-token-propagation-reactive/deployment/src/main/java/io/quarkus/oidc/token/propagation/reactive/OidcTokenPropagationReactiveBuildStep.java +++ b/extensions/oidc-token-propagation-reactive/deployment/src/main/java/io/quarkus/oidc/token/propagation/reactive/OidcTokenPropagationReactiveBuildStep.java @@ -86,7 +86,7 @@ public static class IsEnabled implements BooleanSupplier { OidcTokenPropagationReactiveBuildTimeConfig config; public boolean getAsBoolean() { - return config.enabled; + return config.enabled(); } } @@ -94,7 +94,7 @@ public static class IsEnabledDuringAuth implements BooleanSupplier { OidcTokenPropagationReactiveBuildTimeConfig config; public boolean getAsBoolean() { - return config.enabledDuringAuthentication; + return config.enabledDuringAuthentication(); } } } diff --git a/extensions/oidc-token-propagation-reactive/deployment/src/main/java/io/quarkus/oidc/token/propagation/reactive/OidcTokenPropagationReactiveBuildTimeConfig.java b/extensions/oidc-token-propagation-reactive/deployment/src/main/java/io/quarkus/oidc/token/propagation/reactive/OidcTokenPropagationReactiveBuildTimeConfig.java index 5d083a9e69f6f..f87408763d8cf 100644 --- a/extensions/oidc-token-propagation-reactive/deployment/src/main/java/io/quarkus/oidc/token/propagation/reactive/OidcTokenPropagationReactiveBuildTimeConfig.java +++ b/extensions/oidc-token-propagation-reactive/deployment/src/main/java/io/quarkus/oidc/token/propagation/reactive/OidcTokenPropagationReactiveBuildTimeConfig.java @@ -1,18 +1,20 @@ package io.quarkus.oidc.token.propagation.reactive; -import io.quarkus.runtime.annotations.ConfigItem; import io.quarkus.runtime.annotations.ConfigRoot; +import io.smallrye.config.ConfigMapping; +import io.smallrye.config.WithDefault; /** * Build time configuration for OIDC Token Propagation Reactive. */ -@ConfigRoot(name = "rest-client-oidc-token-propagation") -public class OidcTokenPropagationReactiveBuildTimeConfig { +@ConfigMapping(prefix = "quarkus.rest-client-oidc-token-propagation") +@ConfigRoot +public interface OidcTokenPropagationReactiveBuildTimeConfig { /** * If the OIDC Token Reactive Propagation is enabled. */ - @ConfigItem(defaultValue = "true") - public boolean enabled; + @WithDefault("true") + boolean enabled(); /** * Whether the token propagation is enabled during the `SecurityIdentity` augmentation. @@ -25,6 +27,6 @@ public class OidcTokenPropagationReactiveBuildTimeConfig { * * @asciidoclet */ - @ConfigItem(defaultValue = "false") - public boolean enabledDuringAuthentication; + @WithDefault("false") + boolean enabledDuringAuthentication(); } diff --git a/extensions/oidc-token-propagation-reactive/runtime/src/main/java/io/quarkus/oidc/token/propagation/reactive/OidcTokenPropagationReactiveConfig.java b/extensions/oidc-token-propagation-reactive/runtime/src/main/java/io/quarkus/oidc/token/propagation/reactive/OidcTokenPropagationReactiveConfig.java index 7ea5b16a149e7..e982a38df9e6a 100644 --- a/extensions/oidc-token-propagation-reactive/runtime/src/main/java/io/quarkus/oidc/token/propagation/reactive/OidcTokenPropagationReactiveConfig.java +++ b/extensions/oidc-token-propagation-reactive/runtime/src/main/java/io/quarkus/oidc/token/propagation/reactive/OidcTokenPropagationReactiveConfig.java @@ -2,25 +2,26 @@ import java.util.Optional; -import io.quarkus.runtime.annotations.ConfigItem; import io.quarkus.runtime.annotations.ConfigPhase; import io.quarkus.runtime.annotations.ConfigRoot; +import io.smallrye.config.ConfigMapping; +import io.smallrye.config.WithDefault; -@ConfigRoot(name = "rest-client-oidc-token-propagation", phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) -public class OidcTokenPropagationReactiveConfig { +@ConfigMapping(prefix = "quarkus.rest-client-oidc-token-propagation") +@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) +public interface OidcTokenPropagationReactiveConfig { /** * Exchange the current token with OpenId Connect Provider for a new token using either * "urn:ietf:params:oauth:grant-type:token-exchange" or "urn:ietf:params:oauth:grant-type:jwt-bearer" token grant * before propagating it. */ - @ConfigItem(defaultValue = "false") - public boolean exchangeToken; + @WithDefault("false") + boolean exchangeToken(); /** * Name of the configured OidcClient. * * Note this property is only used if the `exchangeToken` property is enabled. */ - @ConfigItem - public Optional clientName; + Optional clientName(); } diff --git a/extensions/oidc-token-propagation-reactive/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/oidc-token-propagation-reactive/runtime/src/main/resources/META-INF/quarkus-extension.yaml index 352129c550753..a5d8a019ec4c7 100644 --- a/extensions/oidc-token-propagation-reactive/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/oidc-token-propagation-reactive/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -13,4 +13,5 @@ metadata: - "security" status: "stable" config: + - "quarkus.rest-client-oidc-token-propagation." - "quarkus.oidc-token-propagation-reactive." diff --git a/extensions/oidc-token-propagation/deployment/src/main/java/io/quarkus/oidc/token/propagation/deployment/OidcTokenPropagationBuildStep.java b/extensions/oidc-token-propagation/deployment/src/main/java/io/quarkus/oidc/token/propagation/deployment/OidcTokenPropagationBuildStep.java index 758e26623c8b0..1341908114d33 100644 --- a/extensions/oidc-token-propagation/deployment/src/main/java/io/quarkus/oidc/token/propagation/deployment/OidcTokenPropagationBuildStep.java +++ b/extensions/oidc-token-propagation/deployment/src/main/java/io/quarkus/oidc/token/propagation/deployment/OidcTokenPropagationBuildStep.java @@ -53,8 +53,8 @@ void registerProvider(BuildProducer additionalBeans, reflectiveClass .produce(ReflectiveClassBuildItem.builder(JsonWebTokenRequestFilter.class).methods().fields().build()); - if (config.registerFilter) { - Class filterClass = config.jsonWebToken ? JsonWebTokenRequestFilter.class : AccessTokenRequestFilter.class; + if (config.registerFilter()) { + Class filterClass = config.jsonWebToken() ? JsonWebTokenRequestFilter.class : AccessTokenRequestFilter.class; jaxrsProviders.produce(new ResteasyJaxrsProviderBuildItem(filterClass.getName())); } else { restAnnotationProvider.produce(new RestClientAnnotationProviderBuildItem(JWT_ACCESS_TOKEN_CREDENTIAL, diff --git a/extensions/oidc-token-propagation/runtime/src/main/java/io/quarkus/oidc/token/propagation/runtime/OidcTokenPropagationConfig.java b/extensions/oidc-token-propagation/runtime/src/main/java/io/quarkus/oidc/token/propagation/runtime/OidcTokenPropagationConfig.java index f438e278014ec..ac16df888f8a3 100644 --- a/extensions/oidc-token-propagation/runtime/src/main/java/io/quarkus/oidc/token/propagation/runtime/OidcTokenPropagationConfig.java +++ b/extensions/oidc-token-propagation/runtime/src/main/java/io/quarkus/oidc/token/propagation/runtime/OidcTokenPropagationConfig.java @@ -2,12 +2,14 @@ import java.util.Optional; -import io.quarkus.runtime.annotations.ConfigItem; import io.quarkus.runtime.annotations.ConfigPhase; import io.quarkus.runtime.annotations.ConfigRoot; +import io.smallrye.config.ConfigMapping; +import io.smallrye.config.WithDefault; -@ConfigRoot(name = "resteasy-client-oidc-token-propagation", phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) -public class OidcTokenPropagationConfig { +@ConfigMapping(prefix = "quarkus.resteasy-client-oidc-token-propagation") +@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) +public interface OidcTokenPropagationConfig { /** * Enable either AccessTokenRequestFilter or JsonWebTokenRequestFilter for all the injected MP RestClient implementations. * @@ -20,8 +22,8 @@ public class OidcTokenPropagationConfig { * implementations, both filters can be registered as MP RestClient providers with the specific MP RestClient * implementations. */ - @ConfigItem(defaultValue = "false") - public boolean registerFilter; + @WithDefault("false") + boolean registerFilter(); /** * Enable JsonWebTokenRequestFilter instead of AccessTokenRequestFilter for all the injected MP RestClient implementations. @@ -29,8 +31,8 @@ public class OidcTokenPropagationConfig { * * Note this property is ignored unless the 'registerFilter' property is enabled. */ - @ConfigItem(defaultValue = "false") - public boolean jsonWebToken; + @WithDefault("false") + boolean jsonWebToken(); /** * Secure the injected and possibly modified JsonWebToken. @@ -38,8 +40,8 @@ public class OidcTokenPropagationConfig { * * Note this property is injected into JsonWebTokenRequestFilter. */ - @ConfigItem(defaultValue = "false") - public boolean secureJsonWebToken; + @WithDefault("false") + boolean secureJsonWebToken(); /** * Exchange the current token with OpenId Connect Provider for a new token using either @@ -48,14 +50,13 @@ public class OidcTokenPropagationConfig { * * Note this property is injected into AccessTokenRequestFilter. */ - @ConfigItem(defaultValue = "false") - public boolean exchangeToken; + @WithDefault("false") + boolean exchangeToken(); /** * Name of the configured OidcClient. * * Note this property is injected into AccessTokenRequestFilter and is only used if the `exchangeToken` property is enabled. */ - @ConfigItem - public Optional clientName; + Optional clientName(); } diff --git a/extensions/oidc-token-propagation/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/oidc-token-propagation/runtime/src/main/resources/META-INF/quarkus-extension.yaml index cc4562d2a44d3..e6b925428f535 100644 --- a/extensions/oidc-token-propagation/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/oidc-token-propagation/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -13,4 +13,5 @@ metadata: - "security" status: "stable" config: + - "quarkus.resteasy-client-token-propagation." - "quarkus.oidc-token-propagation." diff --git a/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/OidcTenantConfig.java b/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/OidcTenantConfig.java index 4dd066ef7d662..20a4d3e3587ba 100644 --- a/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/OidcTenantConfig.java +++ b/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/OidcTenantConfig.java @@ -92,6 +92,17 @@ public class OidcTenantConfig extends OidcCommonConfig { @ConfigItem public Optional endSessionPath = Optional.empty(); + /** + * The paths which must be secured by this tenant. Tenant with the most specific path wins. + * Please see the xref:security-openid-connect-multitenancy.adoc#configuration-based-tenant-resolver[Resolve with + * configuration] + * section of the OIDC multitenancy guide for explanation of allowed path patterns. + * + * @asciidoclet + */ + @ConfigItem + public Optional> tenantPaths = Optional.empty(); + /** * The public key for the local JWT token verification. * OIDC server connection is not created when this property is set. diff --git a/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/DefaultTenantConfigResolver.java b/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/DefaultTenantConfigResolver.java index 114f9f8e375de..6e4e72bfd7569 100644 --- a/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/DefaultTenantConfigResolver.java +++ b/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/DefaultTenantConfigResolver.java @@ -28,6 +28,7 @@ import io.quarkus.security.identity.SecurityIdentity; import io.quarkus.security.spi.runtime.BlockingSecurityExecutor; import io.quarkus.security.spi.runtime.SecurityEventHelper; +import io.quarkus.vertx.http.runtime.security.ImmutablePathMatcher; import io.smallrye.mutiny.Uni; import io.vertx.ext.web.RoutingContext; @@ -38,8 +39,12 @@ public class DefaultTenantConfigResolver { private static final String CURRENT_STATIC_TENANT_ID = "static.tenant.id"; private static final String CURRENT_STATIC_TENANT_ID_NULL = "static.tenant.id.null"; private static final String CURRENT_DYNAMIC_TENANT_CONFIG = "dynamic.tenant.config"; - - private DefaultStaticTenantResolver defaultStaticTenantResolver = new DefaultStaticTenantResolver(); + private final ConcurrentHashMap backChannelLogoutTokens = new ConcurrentHashMap<>(); + private final DefaultStaticTenantResolver defaultStaticTenantResolver = new DefaultStaticTenantResolver(); + private final TenantResolver pathMatchingTenantResolver; + private final BlockingTaskRunner blockingRequestContext; + private final boolean securityEventObserved; + private final TenantConfigBean tenantConfigBean; @Inject Instance tenantResolver; @@ -50,9 +55,6 @@ public class DefaultTenantConfigResolver { @Inject Instance javaScriptRequestChecker; - @Inject - TenantConfigBean tenantConfigBean; - @Inject Instance tokenStateManager; @@ -69,17 +71,15 @@ public class DefaultTenantConfigResolver { @ConfigProperty(name = "quarkus.http.proxy.enable-forwarded-prefix") boolean enableHttpForwardedPrefix; - private final BlockingTaskRunner blockingRequestContext; - - private final boolean securityEventObserved; - - private ConcurrentHashMap backChannelLogoutTokens = new ConcurrentHashMap<>(); - - public DefaultTenantConfigResolver(BlockingSecurityExecutor blockingExecutor, BeanManager beanManager, - @ConfigProperty(name = "quarkus.security.events.enabled") boolean securityEventsEnabled) { + DefaultTenantConfigResolver(BlockingSecurityExecutor blockingExecutor, BeanManager beanManager, + @ConfigProperty(name = "quarkus.security.events.enabled") boolean securityEventsEnabled, + @ConfigProperty(name = "quarkus.http.root-path") String rootPath, TenantConfigBean tenantConfigBean) { this.blockingRequestContext = new BlockingTaskRunner(blockingExecutor); this.securityEventObserved = SecurityEventHelper.isEventObserved(new SecurityEvent(null, (SecurityIdentity) null), beanManager, securityEventsEnabled); + this.tenantConfigBean = tenantConfigBean; + this.pathMatchingTenantResolver = PathMatchingTenantResolver.of(tenantConfigBean.getStaticTenantsConfig(), rootPath, + tenantConfigBean.getDefaultTenant()); } @PostConstruct @@ -152,30 +152,48 @@ private Uni initializeTenantIfContextNotReady(TenantConfigC } private TenantConfigContext getStaticTenantContext(RoutingContext context) { - String tenantId = context.get(CURRENT_STATIC_TENANT_ID); - if (tenantId == null && context.get(CURRENT_STATIC_TENANT_ID_NULL) == null) { - if (tenantResolver.isResolvable()) { - tenantId = tenantResolver.get().resolve(context); + tenantId = resolveStaticTenantId(context); + if (tenantId != null) { + context.put(CURRENT_STATIC_TENANT_ID, tenantId); + } else { + context.put(CURRENT_STATIC_TENANT_ID_NULL, true); } + } - if (tenantId == null && tenantConfigBean.getStaticTenantsConfig().size() > 0) { - tenantId = defaultStaticTenantResolver.resolve(context); - } + return getStaticTenantContext(tenantId); + } + + private String resolveStaticTenantId(RoutingContext context) { + String tenantId; + if (tenantResolver.isResolvable()) { + tenantId = tenantResolver.get().resolve(context); - if (tenantId == null) { - tenantId = context.get(OidcUtils.TENANT_ID_ATTRIBUTE); + if (tenantId != null) { + return tenantId; } } + tenantId = context.get(OidcUtils.TENANT_ID_ATTRIBUTE); + if (tenantId != null) { - context.put(CURRENT_STATIC_TENANT_ID, tenantId); - } else { - context.put(CURRENT_STATIC_TENANT_ID_NULL, true); + return tenantId; } - return getStaticTenantContext(tenantId); + if (pathMatchingTenantResolver != null) { + tenantId = pathMatchingTenantResolver.resolve(context); + + if (tenantId != null) { + return tenantId; + } + } + + if (!tenantConfigBean.getStaticTenantsConfig().isEmpty()) { + tenantId = defaultStaticTenantResolver.resolve(context); + } + + return tenantId; } private TenantConfigContext getStaticTenantContext(String tenantId) { @@ -274,10 +292,6 @@ private class DefaultStaticTenantResolver implements TenantResolver { @Override public String resolve(RoutingContext context) { - String tenantId = context.get(OidcUtils.TENANT_ID_ATTRIBUTE); - if (tenantId != null) { - return tenantId; - } String[] pathSegments = context.request().path().split("/"); if (pathSegments.length > 0) { String lastPathSegment = pathSegments[pathSegments.length - 1]; @@ -287,7 +301,44 @@ public String resolve(RoutingContext context) { } return null; } + } + + private static class PathMatchingTenantResolver implements TenantResolver { + private static final String DEFAULT_TENANT = "PathMatchingTenantResolver#DefaultTenant"; + private final ImmutablePathMatcher staticTenantPaths; + + private PathMatchingTenantResolver(ImmutablePathMatcher staticTenantPaths) { + this.staticTenantPaths = staticTenantPaths; + } + private static PathMatchingTenantResolver of(Map staticTenantsConfig, String rootPath, + TenantConfigContext defaultTenant) { + final var builder = ImmutablePathMatcher. builder().rootPath(rootPath); + addPath(DEFAULT_TENANT, defaultTenant.oidcConfig, builder); + for (Map.Entry e : staticTenantsConfig.entrySet()) { + addPath(e.getKey(), e.getValue().oidcConfig, builder); + } + return builder.hasPaths() ? new PathMatchingTenantResolver(builder.build()) : null; + } + + @Override + public String resolve(RoutingContext context) { + String tenantId = staticTenantPaths.match(context.normalizedPath()).getValue(); + if (tenantId != null && tenantId != DEFAULT_TENANT) { + return tenantId; + } + return null; + } + + private static ImmutablePathMatcher.ImmutablePathMatcherBuilder addPath(String tenant, OidcTenantConfig config, + ImmutablePathMatcher.ImmutablePathMatcherBuilder builder) { + if (config != null && config.tenantPaths.isPresent()) { + for (String path : config.tenantPaths.get()) { + builder.addPath(path, tenant); + } + } + return builder; + } } } diff --git a/extensions/opentelemetry/runtime/pom.xml b/extensions/opentelemetry/runtime/pom.xml index a00664a9560ab..acd03f1762e5d 100644 --- a/extensions/opentelemetry/runtime/pom.xml +++ b/extensions/opentelemetry/runtime/pom.xml @@ -58,7 +58,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging + quarkus-messaging true diff --git a/extensions/panache/panache-hibernate-common/runtime/src/main/java/io/quarkus/panache/hibernate/common/runtime/PanacheJpaUtil.java b/extensions/panache/panache-hibernate-common/runtime/src/main/java/io/quarkus/panache/hibernate/common/runtime/PanacheJpaUtil.java index 13230c3c28c2d..6685c3bcee2e1 100644 --- a/extensions/panache/panache-hibernate-common/runtime/src/main/java/io/quarkus/panache/hibernate/common/runtime/PanacheJpaUtil.java +++ b/extensions/panache/panache-hibernate-common/runtime/src/main/java/io/quarkus/panache/hibernate/common/runtime/PanacheJpaUtil.java @@ -98,7 +98,9 @@ public static String getCountQueryUsingParser(String query) { public static String getEntityName(Class entityClass) { // FIXME: not true? - return entityClass.getName(); + // Escape the entity name just in case some keywords are used + // in package names that will prevent ORM from executing a query + return "`%s`".formatted(entityClass.getName()); } public static String createFindQuery(Class entityClass, String query, int paramCount) { diff --git a/extensions/resteasy-classic/resteasy-client/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/resteasy-classic/resteasy-client/runtime/src/main/resources/META-INF/quarkus-extension.yaml index 709a305eef669..fc1644726eeb3 100644 --- a/extensions/resteasy-classic/resteasy-client/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/resteasy-classic/resteasy-client/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -10,8 +10,10 @@ metadata: categories: - "web" codestart: - name: "rest-client" + name: "resteasy-client" languages: - "java" - "kotlin" artifact: "io.quarkus:quarkus-project-core-extension-codestarts" + config: + - "quarkus.rest-client." diff --git a/extensions/resteasy-reactive/rest-client/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/resteasy-reactive/rest-client/runtime/src/main/resources/META-INF/quarkus-extension.yaml index de79bd08bce04..a8ad2e19471cd 100644 --- a/extensions/resteasy-reactive/rest-client/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/resteasy-reactive/rest-client/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -12,12 +12,11 @@ metadata: status: "stable" guide: "https://quarkus.io/guides/rest-client" codestart: - name: "rest" - kind: "core" + name: "rest-client" languages: - "java" - "kotlin" - - "scala" artifact: "io.quarkus:quarkus-project-core-extension-codestarts" config: + - "quarkus.rest-client." - "quarkus.rest-client-reactive." diff --git a/extensions/resteasy-reactive/rest-csrf/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/resteasy-reactive/rest-csrf/runtime/src/main/resources/META-INF/quarkus-extension.yaml index aad1faa0ff523..a576f45f71929 100644 --- a/extensions/resteasy-reactive/rest-csrf/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/resteasy-reactive/rest-csrf/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -8,4 +8,5 @@ metadata: - "security" status: "preview" config: + - "quarkus.rest-csrf." - "quarkus.csrf-reactive." diff --git a/extensions/resteasy-reactive/rest/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/resteasy-reactive/rest/runtime/src/main/resources/META-INF/quarkus-extension.yaml index 87e3d17f36ba6..b7856a066ba1e 100644 --- a/extensions/resteasy-reactive/rest/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/resteasy-reactive/rest/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -20,4 +20,5 @@ metadata: - "scala" artifact: "io.quarkus:quarkus-project-core-extension-codestarts" config: + - "quarkus.rest." - "quarkus.resteasy-reactive." diff --git a/extensions/smallrye-reactive-messaging-amqp/deployment/pom.xml b/extensions/smallrye-reactive-messaging-amqp/deployment/pom.xml index ecd53ab12ed09..69691de56ac95 100644 --- a/extensions/smallrye-reactive-messaging-amqp/deployment/pom.xml +++ b/extensions/smallrye-reactive-messaging-amqp/deployment/pom.xml @@ -6,12 +6,12 @@ io.quarkus - quarkus-smallrye-reactive-messaging-amqp-parent + quarkus-messaging-amqp-parent 999-SNAPSHOT - quarkus-smallrye-reactive-messaging-amqp-deployment - Quarkus - SmallRye Reactive Messaging - AMQP 1.0 - Deployment + quarkus-messaging-amqp-deployment + Quarkus - Messaging - AMQP 1.0 - Deployment @@ -20,11 +20,11 @@ io.quarkus - quarkus-smallrye-reactive-messaging-deployment + quarkus-messaging-deployment io.quarkus - quarkus-smallrye-reactive-messaging-amqp + quarkus-messaging-amqp io.quarkus 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 adc0cc2555bd7..4797f9cf9907d 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 @@ -210,7 +210,7 @@ private RunningDevService getRunningService(String containerId, Closeable closea configMap.put(AMQP_MAPPED_PORT_PROP, String.valueOf(mappedPort)); configMap.put(AMQP_USER_PROP, DEFAULT_USER); configMap.put(AMQP_PASSWORD_PROP, DEFAULT_PASSWORD); - return new RunningDevService(Feature.SMALLRYE_REACTIVE_MESSAGING_AMQP.getName(), containerId, closeable, configMap); + return new RunningDevService(Feature.MESSAGING_AMQP.getName(), containerId, closeable, configMap); } private boolean hasAmqpChannelWithoutHostAndPort() { diff --git a/extensions/smallrye-reactive-messaging-amqp/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/amqp/deployment/SmallRyeReactiveMessagingAmqpProcessor.java b/extensions/smallrye-reactive-messaging-amqp/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/amqp/deployment/SmallRyeReactiveMessagingAmqpProcessor.java index d8ea700cff28b..e833218bad8ef 100644 --- a/extensions/smallrye-reactive-messaging-amqp/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/amqp/deployment/SmallRyeReactiveMessagingAmqpProcessor.java +++ b/extensions/smallrye-reactive-messaging-amqp/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/amqp/deployment/SmallRyeReactiveMessagingAmqpProcessor.java @@ -8,7 +8,7 @@ public class SmallRyeReactiveMessagingAmqpProcessor { @BuildStep FeatureBuildItem feature() { - return new FeatureBuildItem(Feature.SMALLRYE_REACTIVE_MESSAGING_AMQP); + return new FeatureBuildItem(Feature.MESSAGING_AMQP); } } diff --git a/extensions/smallrye-reactive-messaging-amqp/pom.xml b/extensions/smallrye-reactive-messaging-amqp/pom.xml index 8c0d42c64e5e7..fe6e93aaad2af 100644 --- a/extensions/smallrye-reactive-messaging-amqp/pom.xml +++ b/extensions/smallrye-reactive-messaging-amqp/pom.xml @@ -10,8 +10,8 @@ 4.0.0 - quarkus-smallrye-reactive-messaging-amqp-parent - Quarkus - SmallRye Reactive Messaging - AMQP 1.0 + quarkus-messaging-amqp-parent + Quarkus - Messaging - AMQP 1.0 pom diff --git a/extensions/smallrye-reactive-messaging-amqp/runtime/pom.xml b/extensions/smallrye-reactive-messaging-amqp/runtime/pom.xml index 419590811addb..539547dcc75aa 100644 --- a/extensions/smallrye-reactive-messaging-amqp/runtime/pom.xml +++ b/extensions/smallrye-reactive-messaging-amqp/runtime/pom.xml @@ -6,12 +6,12 @@ io.quarkus - quarkus-smallrye-reactive-messaging-amqp-parent + quarkus-messaging-amqp-parent 999-SNAPSHOT - quarkus-smallrye-reactive-messaging-amqp - Quarkus - SmallRye Reactive Messaging - AMQP 1.0 - Runtime + quarkus-messaging-amqp + Quarkus - Messaging - AMQP 1.0 - Runtime Connect to AMQP with Reactive Messaging @@ -24,7 +24,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging + quarkus-messaging io.quarkus diff --git a/extensions/smallrye-reactive-messaging-amqp/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/smallrye-reactive-messaging-amqp/runtime/src/main/resources/META-INF/quarkus-extension.yaml index dd55665d3d076..83e46fbf4a358 100644 --- a/extensions/smallrye-reactive-messaging-amqp/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/smallrye-reactive-messaging-amqp/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -1,6 +1,6 @@ --- artifact: ${project.groupId}:${project.artifactId}:${project.version} -name: "SmallRye Reactive Messaging - AMQP Connector" +name: "Messaging - AMQP Connector" metadata: short-name: "amqp" keywords: @@ -12,10 +12,10 @@ metadata: status: "stable" config: - "mp.messaging." - - "quarkus.reactive-messaging." + - "quarkus.messaging." - "quarkus.amqp." codestart: - name: "reactive-messaging" + name: "messaging" languages: - "java" artifact: "io.quarkus:quarkus-project-core-extension-codestarts" diff --git a/extensions/smallrye-reactive-messaging-kafka/deployment/pom.xml b/extensions/smallrye-reactive-messaging-kafka/deployment/pom.xml index dd31c1e8c2109..ee98dc61ef876 100644 --- a/extensions/smallrye-reactive-messaging-kafka/deployment/pom.xml +++ b/extensions/smallrye-reactive-messaging-kafka/deployment/pom.xml @@ -6,12 +6,12 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka-parent + quarkus-messaging-kafka-parent 999-SNAPSHOT - quarkus-smallrye-reactive-messaging-kafka-deployment - Quarkus - SmallRye Reactive Messaging - Kafka - Deployment + quarkus-messaging-kafka-deployment + Quarkus - Messaging - Kafka - Deployment @@ -20,7 +20,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-deployment + quarkus-messaging-deployment io.quarkus @@ -32,7 +32,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-messaging-kafka io.quarkus diff --git a/extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/ReactiveMessagingKafkaBuildTimeConfig.java b/extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/ReactiveMessagingKafkaBuildTimeConfig.java index 38fc4535612b0..512684e84111b 100644 --- a/extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/ReactiveMessagingKafkaBuildTimeConfig.java +++ b/extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/ReactiveMessagingKafkaBuildTimeConfig.java @@ -4,7 +4,7 @@ import io.quarkus.runtime.annotations.ConfigPhase; import io.quarkus.runtime.annotations.ConfigRoot; -@ConfigRoot(name = "reactive-messaging.kafka", phase = ConfigPhase.BUILD_TIME) +@ConfigRoot(name = "messaging.kafka", phase = ConfigPhase.BUILD_TIME) public class ReactiveMessagingKafkaBuildTimeConfig { /** * Whether or not Kafka serializer/deserializer auto-detection is enabled. diff --git a/extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/SmallRyeReactiveMessagingKafkaProcessor.java b/extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/SmallRyeReactiveMessagingKafkaProcessor.java index 7a042db169703..df4f15d53c438 100644 --- a/extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/SmallRyeReactiveMessagingKafkaProcessor.java +++ b/extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/SmallRyeReactiveMessagingKafkaProcessor.java @@ -64,7 +64,7 @@ public class SmallRyeReactiveMessagingKafkaProcessor { @BuildStep FeatureBuildItem feature() { - return new FeatureBuildItem(Feature.SMALLRYE_REACTIVE_MESSAGING_KAFKA); + return new FeatureBuildItem(Feature.MESSAGING_KAFKA); } @BuildStep diff --git a/extensions/smallrye-reactive-messaging-kafka/pom.xml b/extensions/smallrye-reactive-messaging-kafka/pom.xml index d8acb1fcd1a42..e8e835ebfff33 100644 --- a/extensions/smallrye-reactive-messaging-kafka/pom.xml +++ b/extensions/smallrye-reactive-messaging-kafka/pom.xml @@ -10,8 +10,8 @@ 4.0.0 - quarkus-smallrye-reactive-messaging-kafka-parent - Quarkus - SmallRye Reactive Messaging - Kafka + quarkus-messaging-kafka-parent + Quarkus - Messaging - Kafka pom diff --git a/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml b/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml index 3d13beb2ab886..1850842ce57dd 100644 --- a/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml +++ b/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml @@ -6,12 +6,12 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka-parent + quarkus-messaging-kafka-parent 999-SNAPSHOT - quarkus-smallrye-reactive-messaging-kafka - Quarkus - SmallRye Reactive Messaging - Kafka - Runtime + quarkus-messaging-kafka + Quarkus - Messaging - Kafka - Runtime Connect to Kafka with Reactive Messaging @@ -49,7 +49,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging + quarkus-messaging io.smallrye.reactive diff --git a/extensions/smallrye-reactive-messaging-kafka/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/ReactiveMessagingKafkaConfig.java b/extensions/smallrye-reactive-messaging-kafka/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/ReactiveMessagingKafkaConfig.java index 8278f33d0c1e3..6865cb3c79e0d 100644 --- a/extensions/smallrye-reactive-messaging-kafka/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/ReactiveMessagingKafkaConfig.java +++ b/extensions/smallrye-reactive-messaging-kafka/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/ReactiveMessagingKafkaConfig.java @@ -3,7 +3,7 @@ import io.quarkus.runtime.annotations.ConfigItem; import io.quarkus.runtime.annotations.ConfigRoot; -@ConfigRoot(name = "reactive-messaging.kafka") +@ConfigRoot(name = "messaging.kafka") public class ReactiveMessagingKafkaConfig { /** diff --git a/extensions/smallrye-reactive-messaging-kafka/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/smallrye-reactive-messaging-kafka/runtime/src/main/resources/META-INF/quarkus-extension.yaml index 16c2f38660922..c2b45b5d7739d 100644 --- a/extensions/smallrye-reactive-messaging-kafka/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/smallrye-reactive-messaging-kafka/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -1,21 +1,21 @@ --- artifact: ${project.groupId}:${project.artifactId}:${project.version} -name: "SmallRye Reactive Messaging - Kafka Connector" +name: "Messaging - Kafka Connector" metadata: short-name: "kafka" keywords: - "kafka" - "reactive-kafka" - guide: "https://quarkus.io/guides/kafka-reactive-getting-started" + guide: "https://quarkus.io/guides/kafka-getting-started" categories: - "messaging" status: "stable" config: - "mp.messaging." - - "quarkus.reactive-messaging." + - "quarkus.messaging." - "quarkus.kafka." codestart: - name: "reactive-messaging" + name: "messaging" languages: - "java" artifact: "io.quarkus:quarkus-project-core-extension-codestarts" diff --git a/extensions/smallrye-reactive-messaging-mqtt/deployment/pom.xml b/extensions/smallrye-reactive-messaging-mqtt/deployment/pom.xml index cb14241889710..9c5788bf52222 100644 --- a/extensions/smallrye-reactive-messaging-mqtt/deployment/pom.xml +++ b/extensions/smallrye-reactive-messaging-mqtt/deployment/pom.xml @@ -6,16 +6,16 @@ io.quarkus - quarkus-smallrye-reactive-messaging-mqtt-parent + quarkus-messaging-mqtt-parent 999-SNAPSHOT - quarkus-smallrye-reactive-messaging-mqtt-deployment - Quarkus - SmallRye Reactive Messaging - MQTT - Deployment + quarkus-messaging-mqtt-deployment + Quarkus - Messaging - MQTT - Deployment io.quarkus - quarkus-smallrye-reactive-messaging-mqtt + quarkus-messaging-mqtt io.quarkus @@ -23,7 +23,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-deployment + quarkus-messaging-deployment io.quarkus diff --git a/extensions/smallrye-reactive-messaging-mqtt/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/mqtt/deployment/MqttDevServicesProcessor.java b/extensions/smallrye-reactive-messaging-mqtt/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/mqtt/deployment/MqttDevServicesProcessor.java index 51b6d4d516e7f..1fdc9fafa53cd 100644 --- a/extensions/smallrye-reactive-messaging-mqtt/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/mqtt/deployment/MqttDevServicesProcessor.java +++ b/extensions/smallrye-reactive-messaging-mqtt/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/mqtt/deployment/MqttDevServicesProcessor.java @@ -193,7 +193,7 @@ private RunningDevService getRunningDevService( Map configMap = new HashMap<>(); configMap.put("mp.messaging.connector.smallrye-mqtt.host", host); configMap.put("mp.messaging.connector.smallrye-mqtt.port", String.valueOf(port)); - return new RunningDevService(Feature.SMALLRYE_REACTIVE_MESSAGING_MQTT.getName(), + return new RunningDevService(Feature.MESSAGING_MQTT.getName(), containerId, closeable, configMap); } diff --git a/extensions/smallrye-reactive-messaging-mqtt/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/mqtt/deployment/SmallRyeReactiveMessagingMqttProcessor.java b/extensions/smallrye-reactive-messaging-mqtt/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/mqtt/deployment/SmallRyeReactiveMessagingMqttProcessor.java index 6c6004e8d9d21..7241ee579c0db 100644 --- a/extensions/smallrye-reactive-messaging-mqtt/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/mqtt/deployment/SmallRyeReactiveMessagingMqttProcessor.java +++ b/extensions/smallrye-reactive-messaging-mqtt/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/mqtt/deployment/SmallRyeReactiveMessagingMqttProcessor.java @@ -7,6 +7,6 @@ public class SmallRyeReactiveMessagingMqttProcessor { @BuildStep FeatureBuildItem feature() { - return new FeatureBuildItem(Feature.SMALLRYE_REACTIVE_MESSAGING_MQTT); + return new FeatureBuildItem(Feature.MESSAGING_MQTT); } } diff --git a/extensions/smallrye-reactive-messaging-mqtt/pom.xml b/extensions/smallrye-reactive-messaging-mqtt/pom.xml index 48478275fa7e3..e988d4bd752b9 100644 --- a/extensions/smallrye-reactive-messaging-mqtt/pom.xml +++ b/extensions/smallrye-reactive-messaging-mqtt/pom.xml @@ -10,8 +10,8 @@ 4.0.0 - quarkus-smallrye-reactive-messaging-mqtt-parent - Quarkus - SmallRye Reactive Messaging - MQTT + quarkus-messaging-mqtt-parent + Quarkus - Messaging - MQTT pom diff --git a/extensions/smallrye-reactive-messaging-mqtt/runtime/pom.xml b/extensions/smallrye-reactive-messaging-mqtt/runtime/pom.xml index c06b0407059e2..0864f10731380 100644 --- a/extensions/smallrye-reactive-messaging-mqtt/runtime/pom.xml +++ b/extensions/smallrye-reactive-messaging-mqtt/runtime/pom.xml @@ -6,12 +6,12 @@ io.quarkus - quarkus-smallrye-reactive-messaging-mqtt-parent + quarkus-messaging-mqtt-parent 999-SNAPSHOT - quarkus-smallrye-reactive-messaging-mqtt - Quarkus - SmallRye Reactive Messaging - MQTT - Runtime + quarkus-messaging-mqtt + Quarkus - Messaging - MQTT - Runtime Connect to MQTT with Reactive Messaging @@ -24,7 +24,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging + quarkus-messaging io.quarkus diff --git a/extensions/smallrye-reactive-messaging-mqtt/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/smallrye-reactive-messaging-mqtt/runtime/src/main/resources/META-INF/quarkus-extension.yaml index dd61940bd732c..fc68d838bdf4c 100644 --- a/extensions/smallrye-reactive-messaging-mqtt/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/smallrye-reactive-messaging-mqtt/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -1,6 +1,6 @@ --- artifact: ${project.groupId}:${project.artifactId}:${project.version} -name: "SmallRye Reactive Messaging - MQTT Connector" +name: "Messaging - MQTT Connector" metadata: keywords: - "mqtt" @@ -10,4 +10,4 @@ metadata: status: "preview" config: - "mp.messaging." - - "quarkus.reactive-messaging." + - "quarkus.messaging." diff --git a/extensions/smallrye-reactive-messaging-pulsar/deployment/pom.xml b/extensions/smallrye-reactive-messaging-pulsar/deployment/pom.xml index 8647639a16569..1b459de02cf68 100644 --- a/extensions/smallrye-reactive-messaging-pulsar/deployment/pom.xml +++ b/extensions/smallrye-reactive-messaging-pulsar/deployment/pom.xml @@ -6,12 +6,12 @@ io.quarkus - quarkus-smallrye-reactive-messaging-pulsar-parent + quarkus-messaging-pulsar-parent 999-SNAPSHOT - quarkus-smallrye-reactive-messaging-pulsar-deployment - Quarkus - SmallRye Reactive Messaging - Pulsar - Deployment + quarkus-messaging-pulsar-deployment + Quarkus - Messaging - Pulsar - Deployment @@ -24,11 +24,11 @@ io.quarkus - quarkus-smallrye-reactive-messaging-deployment + quarkus-messaging-deployment io.quarkus - quarkus-smallrye-reactive-messaging-pulsar + quarkus-messaging-pulsar io.quarkus diff --git a/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/PulsarDevServicesProcessor.java b/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/PulsarDevServicesProcessor.java index 6e4ff1fa51a45..f4d7dbc302eae 100644 --- a/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/PulsarDevServicesProcessor.java +++ b/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/PulsarDevServicesProcessor.java @@ -203,7 +203,7 @@ private RunningDevService getRunningService(String containerId, Closeable closea Map configMap = new HashMap<>(); configMap.put(PULSAR_CLIENT_SERVICE_URL, pulsarBrokerUrl); configMap.put(PULSAR_ADMIN_SERVICE_URL, httpServiceUrl); - return new RunningDevService(Feature.SMALLRYE_REACTIVE_MESSAGING_PULSAR.getName(), containerId, closeable, configMap); + return new RunningDevService(Feature.MESSAGING_PULSAR.getName(), containerId, closeable, configMap); } private boolean hasPulsarChannelWithoutHostAndPort() { diff --git a/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/ReactiveMessagingPulsarBuildTimeConfig.java b/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/ReactiveMessagingPulsarBuildTimeConfig.java index 34cde49902c8f..ac819771b046a 100644 --- a/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/ReactiveMessagingPulsarBuildTimeConfig.java +++ b/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/ReactiveMessagingPulsarBuildTimeConfig.java @@ -4,7 +4,7 @@ import io.quarkus.runtime.annotations.ConfigPhase; import io.quarkus.runtime.annotations.ConfigRoot; -@ConfigRoot(name = "reactive-messaging.pulsar", phase = ConfigPhase.BUILD_TIME) +@ConfigRoot(name = "messaging.pulsar", phase = ConfigPhase.BUILD_TIME) public class ReactiveMessagingPulsarBuildTimeConfig { /** * Whether or not Pulsar Schema auto-detection is enabled. diff --git a/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java b/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java index a636a9d373b34..26269416f743c 100644 --- a/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java +++ b/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java @@ -37,7 +37,7 @@ public class SmallRyeReactiveMessagingPulsarProcessor { @BuildStep FeatureBuildItem feature() { - return new FeatureBuildItem(Feature.SMALLRYE_REACTIVE_MESSAGING_PULSAR); + return new FeatureBuildItem(Feature.MESSAGING_PULSAR); } @BuildStep @@ -135,7 +135,7 @@ public NativeImageConfigBuildItem pulsarRuntimeInitialized( CombinedIndexBuildItem combinedIndex, BuildProducer reflectiveClass, BuildProducer nativeSslSupport) { - nativeSslSupport.produce(new ExtensionSslNativeSupportBuildItem(Feature.SMALLRYE_REACTIVE_MESSAGING_PULSAR)); + nativeSslSupport.produce(new ExtensionSslNativeSupportBuildItem(Feature.MESSAGING_PULSAR)); reflectiveClass.produce(ReflectiveClassBuildItem .builder(ClientConfigurationData.class.getName(), ProducerConfigurationData.class.getName(), diff --git a/extensions/smallrye-reactive-messaging-pulsar/pom.xml b/extensions/smallrye-reactive-messaging-pulsar/pom.xml index 227cb9f1b1969..0798762c5965b 100644 --- a/extensions/smallrye-reactive-messaging-pulsar/pom.xml +++ b/extensions/smallrye-reactive-messaging-pulsar/pom.xml @@ -10,8 +10,8 @@ 4.0.0 - quarkus-smallrye-reactive-messaging-pulsar-parent - Quarkus - SmallRye Reactive Messaging - Pulsar + quarkus-messaging-pulsar-parent + Quarkus - Messaging - Pulsar pom diff --git a/extensions/smallrye-reactive-messaging-pulsar/runtime/pom.xml b/extensions/smallrye-reactive-messaging-pulsar/runtime/pom.xml index 7578fe5d422fb..5be481317263d 100644 --- a/extensions/smallrye-reactive-messaging-pulsar/runtime/pom.xml +++ b/extensions/smallrye-reactive-messaging-pulsar/runtime/pom.xml @@ -6,12 +6,12 @@ io.quarkus - quarkus-smallrye-reactive-messaging-pulsar-parent + quarkus-messaging-pulsar-parent 999-SNAPSHOT - quarkus-smallrye-reactive-messaging-pulsar - Quarkus - SmallRye Reactive Messaging - Pulsar - Runtime + quarkus-messaging-pulsar + Quarkus - Messaging - Pulsar - Runtime Connect to Apache Pulsar with Reactive Messaging @@ -93,7 +93,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging + quarkus-messaging io.quarkus diff --git a/extensions/smallrye-reactive-messaging-pulsar/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/smallrye-reactive-messaging-pulsar/runtime/src/main/resources/META-INF/quarkus-extension.yaml index 23f8476a9bea2..bf6085c792b62 100644 --- a/extensions/smallrye-reactive-messaging-pulsar/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/smallrye-reactive-messaging-pulsar/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -1,6 +1,6 @@ --- artifact: ${project.groupId}:${project.artifactId}:${project.version} -name: "SmallRye Reactive Messaging - Pulsar Connector" +name: "Messaging - Pulsar Connector" metadata: short-name: "pulsar" keywords: @@ -12,10 +12,10 @@ metadata: status: "preview" config: - "mp.messaging." - - "quarkus.reactive-messaging." + - "quarkus.messaging." - "quarkus.pulsar." codestart: - name: "reactive-messaging" + name: "messaging" languages: - "java" artifact: "io.quarkus:quarkus-project-core-extension-codestarts" diff --git a/extensions/smallrye-reactive-messaging-rabbitmq/deployment/pom.xml b/extensions/smallrye-reactive-messaging-rabbitmq/deployment/pom.xml index 90c7c2904e4d5..2ad48b27c23fb 100644 --- a/extensions/smallrye-reactive-messaging-rabbitmq/deployment/pom.xml +++ b/extensions/smallrye-reactive-messaging-rabbitmq/deployment/pom.xml @@ -6,12 +6,12 @@ io.quarkus - quarkus-smallrye-reactive-messaging-rabbitmq-parent + quarkus-messaging-rabbitmq-parent 999-SNAPSHOT - quarkus-smallrye-reactive-messaging-rabbitmq-deployment - Quarkus - SmallRye Reactive Messaging - RabbitMQ 1.0 - Deployment + quarkus-messaging-rabbitmq-deployment + Quarkus - Messaging - RabbitMQ 1.0 - Deployment @@ -20,11 +20,11 @@ io.quarkus - quarkus-smallrye-reactive-messaging-deployment + quarkus-messaging-deployment io.quarkus - quarkus-smallrye-reactive-messaging-rabbitmq + quarkus-messaging-rabbitmq io.quarkus diff --git a/extensions/smallrye-reactive-messaging-rabbitmq/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/rabbitmq/deployment/RabbitMQDevServicesProcessor.java b/extensions/smallrye-reactive-messaging-rabbitmq/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/rabbitmq/deployment/RabbitMQDevServicesProcessor.java index 2ab5dc2afb125..c396889739d77 100644 --- a/extensions/smallrye-reactive-messaging-rabbitmq/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/rabbitmq/deployment/RabbitMQDevServicesProcessor.java +++ b/extensions/smallrye-reactive-messaging-rabbitmq/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/rabbitmq/deployment/RabbitMQDevServicesProcessor.java @@ -215,7 +215,7 @@ private RunningDevService getRunningDevService(String containerId, Closeable clo configMap.put(RABBITMQ_HTTP_PORT_PROP, String.valueOf(httpPort)); configMap.put(RABBITMQ_USERNAME_PROP, username); configMap.put(RABBITMQ_PASSWORD_PROP, password); - return new RunningDevService(Feature.SMALLRYE_REACTIVE_MESSAGING_RABBITMQ.getName(), + return new RunningDevService(Feature.MESSAGING_RABBITMQ.getName(), containerId, closeable, configMap); } diff --git a/extensions/smallrye-reactive-messaging-rabbitmq/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/rabbitmq/deployment/SmallRyeReactiveMessagingRabbitMQProcessor.java b/extensions/smallrye-reactive-messaging-rabbitmq/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/rabbitmq/deployment/SmallRyeReactiveMessagingRabbitMQProcessor.java index b0b54ffa49700..6ef67b097a462 100644 --- a/extensions/smallrye-reactive-messaging-rabbitmq/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/rabbitmq/deployment/SmallRyeReactiveMessagingRabbitMQProcessor.java +++ b/extensions/smallrye-reactive-messaging-rabbitmq/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/rabbitmq/deployment/SmallRyeReactiveMessagingRabbitMQProcessor.java @@ -23,7 +23,7 @@ public class SmallRyeReactiveMessagingRabbitMQProcessor { @BuildStep FeatureBuildItem feature() { - return new FeatureBuildItem(Feature.SMALLRYE_REACTIVE_MESSAGING_RABBITMQ); + return new FeatureBuildItem(Feature.MESSAGING_RABBITMQ); } @BuildStep diff --git a/extensions/smallrye-reactive-messaging-rabbitmq/pom.xml b/extensions/smallrye-reactive-messaging-rabbitmq/pom.xml index e3086478f915c..deaab0b51968c 100644 --- a/extensions/smallrye-reactive-messaging-rabbitmq/pom.xml +++ b/extensions/smallrye-reactive-messaging-rabbitmq/pom.xml @@ -10,8 +10,8 @@ 4.0.0 - quarkus-smallrye-reactive-messaging-rabbitmq-parent - Quarkus - SmallRye Reactive Messaging - RabbitMQ 1.0 + quarkus-messaging-rabbitmq-parent + Quarkus - Messaging - RabbitMQ 1.0 pom diff --git a/extensions/smallrye-reactive-messaging-rabbitmq/runtime/pom.xml b/extensions/smallrye-reactive-messaging-rabbitmq/runtime/pom.xml index 26e4513e46ae9..2bd2c55c6a3d4 100644 --- a/extensions/smallrye-reactive-messaging-rabbitmq/runtime/pom.xml +++ b/extensions/smallrye-reactive-messaging-rabbitmq/runtime/pom.xml @@ -6,12 +6,12 @@ io.quarkus - quarkus-smallrye-reactive-messaging-rabbitmq-parent + quarkus-messaging-rabbitmq-parent 999-SNAPSHOT - quarkus-smallrye-reactive-messaging-rabbitmq - Quarkus - SmallRye Reactive Messaging - RabbitMQ 1.0 - Runtime + quarkus-messaging-rabbitmq + Quarkus - Messaging - RabbitMQ 1.0 - Runtime Connect to RabbitMQ with Reactive Messaging @@ -24,7 +24,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging + quarkus-messaging io.quarkus diff --git a/extensions/smallrye-reactive-messaging-rabbitmq/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/smallrye-reactive-messaging-rabbitmq/runtime/src/main/resources/META-INF/quarkus-extension.yaml index d5ecb45397d65..b1b74cc60eecd 100644 --- a/extensions/smallrye-reactive-messaging-rabbitmq/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/smallrye-reactive-messaging-rabbitmq/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -1,6 +1,6 @@ --- artifact: ${project.groupId}:${project.artifactId}:${project.version} -name: "SmallRye Reactive Messaging - RabbitMQ Connector" +name: "Messaging - RabbitMQ Connector" metadata: short-name: "rabbitmq" keywords: @@ -12,5 +12,5 @@ metadata: status: "experimental" config: - "mp.messaging." - - "quarkus.reactive-messaging." + - "quarkus.messaging." - "quarkus.rabbitmq." diff --git a/extensions/smallrye-reactive-messaging/deployment/pom.xml b/extensions/smallrye-reactive-messaging/deployment/pom.xml index c99b6e63e260d..2de388adb375a 100644 --- a/extensions/smallrye-reactive-messaging/deployment/pom.xml +++ b/extensions/smallrye-reactive-messaging/deployment/pom.xml @@ -3,15 +3,15 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> - quarkus-smallrye-reactive-messaging-parent + quarkus-messaging-parent io.quarkus 999-SNAPSHOT 4.0.0 - quarkus-smallrye-reactive-messaging-deployment - Quarkus - SmallRye Reactive Messaging - Deployment + quarkus-messaging-deployment + Quarkus - Messaging - Deployment @@ -24,7 +24,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging + quarkus-messaging io.quarkus diff --git a/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/ReactiveMessagingBuildTimeConfig.java b/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/ReactiveMessagingBuildTimeConfig.java index 57eb0d4667824..a88551ef62393 100644 --- a/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/ReactiveMessagingBuildTimeConfig.java +++ b/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/ReactiveMessagingBuildTimeConfig.java @@ -4,7 +4,7 @@ import io.quarkus.runtime.annotations.ConfigPhase; import io.quarkus.runtime.annotations.ConfigRoot; -@ConfigRoot(name = "reactive-messaging", phase = ConfigPhase.BUILD_TIME) +@ConfigRoot(name = "messaging", phase = ConfigPhase.BUILD_TIME) public class ReactiveMessagingBuildTimeConfig { /** * Whether a health check is published in case the smallrye-health extension is present. diff --git a/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/SmallRyeReactiveMessagingProcessor.java b/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/SmallRyeReactiveMessagingProcessor.java index b5134c2c1ca48..44e65ce0f8ef8 100644 --- a/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/SmallRyeReactiveMessagingProcessor.java +++ b/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/SmallRyeReactiveMessagingProcessor.java @@ -103,7 +103,7 @@ public static String getChannelPropertyKey(String channelName, String propertyNa @BuildStep FeatureBuildItem feature() { - return new FeatureBuildItem(Feature.SMALLRYE_REACTIVE_MESSAGING); + return new FeatureBuildItem(Feature.MESSAGING); } @BuildStep diff --git a/extensions/smallrye-reactive-messaging/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/wiring/DisabledConnectorAttachmentIncomingTest.java b/extensions/smallrye-reactive-messaging/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/wiring/DisabledConnectorAttachmentIncomingTest.java index dd059d54a748d..1ad9f20b029ae 100644 --- a/extensions/smallrye-reactive-messaging/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/wiring/DisabledConnectorAttachmentIncomingTest.java +++ b/extensions/smallrye-reactive-messaging/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/wiring/DisabledConnectorAttachmentIncomingTest.java @@ -31,7 +31,7 @@ public class DisabledConnectorAttachmentIncomingTest { static final QuarkusUnitTest config = new QuarkusUnitTest() .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class) .addClasses(MyDummyConnector.class, MySink.class)) - .overrideConfigKey("quarkus.reactive-messaging.auto-connector-attachment", "false"); + .overrideConfigKey("quarkus.messaging.auto-connector-attachment", "false"); @Inject MySink sink; diff --git a/extensions/smallrye-reactive-messaging/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/wiring/DisabledConnectorAttachmentOutgoingTest.java b/extensions/smallrye-reactive-messaging/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/wiring/DisabledConnectorAttachmentOutgoingTest.java index 0167d67092acd..a7b78b19c995b 100644 --- a/extensions/smallrye-reactive-messaging/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/wiring/DisabledConnectorAttachmentOutgoingTest.java +++ b/extensions/smallrye-reactive-messaging/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/wiring/DisabledConnectorAttachmentOutgoingTest.java @@ -30,7 +30,7 @@ public class DisabledConnectorAttachmentOutgoingTest { static final QuarkusUnitTest config = new QuarkusUnitTest() .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class) .addClasses(MyDummyConnector.class, MySource.class)) - .overrideConfigKey("quarkus.reactive-messaging.auto-connector-attachment", "false"); + .overrideConfigKey("quarkus.messaging.auto-connector-attachment", "false"); @Inject @Connector("dummy") diff --git a/extensions/smallrye-reactive-messaging/kotlin/pom.xml b/extensions/smallrye-reactive-messaging/kotlin/pom.xml index 4eb2850b6ab46..1261dc7af1a7d 100644 --- a/extensions/smallrye-reactive-messaging/kotlin/pom.xml +++ b/extensions/smallrye-reactive-messaging/kotlin/pom.xml @@ -4,13 +4,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> io.quarkus - quarkus-smallrye-reactive-messaging-parent + quarkus-messaging-parent 999-SNAPSHOT 4.0.0 - quarkus-smallrye-reactive-messaging-kotlin - Quarkus - SmallRye Reactive Messaging - Kotlin + quarkus-messaging-kotlin + Quarkus - Messaging - Kotlin diff --git a/extensions/smallrye-reactive-messaging/pom.xml b/extensions/smallrye-reactive-messaging/pom.xml index be34c59f8373d..d1ddd056a965b 100644 --- a/extensions/smallrye-reactive-messaging/pom.xml +++ b/extensions/smallrye-reactive-messaging/pom.xml @@ -10,8 +10,8 @@ 4.0.0 - quarkus-smallrye-reactive-messaging-parent - Quarkus - SmallRye Reactive Messaging + quarkus-messaging-parent + Quarkus - Messaging pom diff --git a/extensions/smallrye-reactive-messaging/runtime/pom.xml b/extensions/smallrye-reactive-messaging/runtime/pom.xml index 30cc9bd512573..7555ee75d41ef 100644 --- a/extensions/smallrye-reactive-messaging/runtime/pom.xml +++ b/extensions/smallrye-reactive-messaging/runtime/pom.xml @@ -3,13 +3,13 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> - quarkus-smallrye-reactive-messaging-parent + quarkus-messaging-parent io.quarkus 999-SNAPSHOT 4.0.0 - quarkus-smallrye-reactive-messaging - Quarkus - SmallRye Reactive Messaging - Runtime + quarkus-messaging + Quarkus - Messaging - Runtime Produce and consume messages and implement event driven and data streaming applications @@ -22,7 +22,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kotlin + quarkus-messaging-kotlin io.quarkus @@ -90,6 +90,7 @@ io.quarkus.smallrye.reactive.messaging + io.quarkus.messaging diff --git a/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/ReactiveMessagingConfigFallbackInterceptor.java b/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/ReactiveMessagingConfigFallbackInterceptor.java new file mode 100644 index 0000000000000..bb71885af9560 --- /dev/null +++ b/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/ReactiveMessagingConfigFallbackInterceptor.java @@ -0,0 +1,25 @@ +package io.quarkus.smallrye.reactivemessaging.runtime; + +import io.smallrye.config.FallbackConfigSourceInterceptor; + +/** + * @deprecated maps the old config to the new config, should be removed at some point + */ +@Deprecated(forRemoval = true, since = "3.9") +public class ReactiveMessagingConfigFallbackInterceptor extends FallbackConfigSourceInterceptor { + + private static final String OLD_PREFIX = "quarkus.reactive-messaging."; + private static final String NEW_PREFIX = "quarkus.messaging."; + + public ReactiveMessagingConfigFallbackInterceptor() { + super(ReactiveMessagingConfigFallbackInterceptor::rename); + } + + private static String rename(String originalName) { + if (!originalName.startsWith(NEW_PREFIX)) { + return originalName; + } + + return originalName.replaceFirst(NEW_PREFIX, OLD_PREFIX); + } +} diff --git a/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/ReactiveMessagingConfigRelocateInterceptor.java b/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/ReactiveMessagingConfigRelocateInterceptor.java new file mode 100644 index 0000000000000..be598ee9b1338 --- /dev/null +++ b/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/ReactiveMessagingConfigRelocateInterceptor.java @@ -0,0 +1,25 @@ +package io.quarkus.smallrye.reactivemessaging.runtime; + +import io.smallrye.config.RelocateConfigSourceInterceptor; + +/** + * @deprecated maps the old config to the new config, should be removed at some point + */ +@Deprecated(forRemoval = true, since = "3.9") +public class ReactiveMessagingConfigRelocateInterceptor extends RelocateConfigSourceInterceptor { + + private static final String OLD_PREFIX = "quarkus.reactive-messaging."; + private static final String NEW_PREFIX = "quarkus.messaging."; + + public ReactiveMessagingConfigRelocateInterceptor() { + super(ReactiveMessagingConfigRelocateInterceptor::rename); + } + + private static String rename(String originalName) { + if (!originalName.startsWith(OLD_PREFIX)) { + return originalName; + } + + return originalName.replaceFirst(OLD_PREFIX, NEW_PREFIX); + } +} diff --git a/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/ReactiveMessagingConfiguration.java b/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/ReactiveMessagingConfiguration.java index 45f27c1f39a34..d621e14a685f7 100644 --- a/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/ReactiveMessagingConfiguration.java +++ b/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/ReactiveMessagingConfiguration.java @@ -4,7 +4,7 @@ import io.quarkus.runtime.annotations.ConfigPhase; import io.quarkus.runtime.annotations.ConfigRoot; -@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) +@ConfigRoot(name = "messaging", phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) public class ReactiveMessagingConfiguration { /** diff --git a/extensions/smallrye-reactive-messaging/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/smallrye-reactive-messaging/runtime/src/main/resources/META-INF/quarkus-extension.yaml index 8c09c53a75aad..0dabfc88cf139 100644 --- a/extensions/smallrye-reactive-messaging/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/smallrye-reactive-messaging/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -1,14 +1,15 @@ --- artifact: ${project.groupId}:${project.artifactId}:${project.version} -name: "SmallRye Reactive Messaging" +name: "Messaging" metadata: keywords: - - "smallrye-reactive-messaging" + - "messaging" - "reactive-messaging" - "reactive" - guide: "https://quarkus.io/guides/reactive-messaging" categories: - "messaging" status: "stable" config: + - "quarkus.messaging." + - "quarkus.smallrye-reactive-messaging." - "mp.messaging." diff --git a/extensions/smallrye-reactive-messaging/runtime/src/main/resources/META-INF/services/io.smallrye.config.ConfigSourceInterceptor b/extensions/smallrye-reactive-messaging/runtime/src/main/resources/META-INF/services/io.smallrye.config.ConfigSourceInterceptor new file mode 100644 index 0000000000000..65b423bffffe4 --- /dev/null +++ b/extensions/smallrye-reactive-messaging/runtime/src/main/resources/META-INF/services/io.smallrye.config.ConfigSourceInterceptor @@ -0,0 +1,2 @@ +io.quarkus.smallrye.reactivemessaging.runtime.ReactiveMessagingConfigRelocateInterceptor +io.quarkus.smallrye.reactivemessaging.runtime.ReactiveMessagingConfigFallbackInterceptor \ No newline at end of file diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/AbstractPathMatchingHttpSecurityPolicy.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/AbstractPathMatchingHttpSecurityPolicy.java index 1520d7734003e..21fbdbb326576 100644 --- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/AbstractPathMatchingHttpSecurityPolicy.java +++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/AbstractPathMatchingHttpSecurityPolicy.java @@ -46,7 +46,8 @@ public AbstractPathMatchingHttpSecurityPolicy(Map p boolean hasNoPermissions = permissions.isEmpty(); var namedHttpSecurityPolicies = toNamedHttpSecPolicies(rolePolicy, installedPolicies); List>> sharedPermsMatchers = new ArrayList<>(); - final var builder = ImmutablePathMatcher.> builder().handlerAccumulator(List::addAll); + final var builder = ImmutablePathMatcher.> builder().handlerAccumulator(List::addAll) + .rootPath(rootPath); for (PolicyMappingConfig policyMappingConfig : permissions.values()) { if (appliesTo != policyMappingConfig.appliesTo) { continue; @@ -55,11 +56,12 @@ public AbstractPathMatchingHttpSecurityPolicy(Map p hasNoPermissions = false; } if (policyMappingConfig.shared) { - final var builder1 = ImmutablePathMatcher.> builder().handlerAccumulator(List::addAll); - addPermissionToPathMatcher(namedHttpSecurityPolicies, rootPath, policyMappingConfig, builder1); + final var builder1 = ImmutablePathMatcher.> builder().handlerAccumulator(List::addAll) + .rootPath(rootPath); + addPermissionToPathMatcher(namedHttpSecurityPolicies, policyMappingConfig, builder1); sharedPermsMatchers.add(builder1.build()); } else { - addPermissionToPathMatcher(namedHttpSecurityPolicies, rootPath, policyMappingConfig, builder); + addPermissionToPathMatcher(namedHttpSecurityPolicies, policyMappingConfig, builder); } } this.hasNoPermissions = hasNoPermissions; @@ -149,7 +151,7 @@ private static String getAuthMechanismName(RoutingContext routingContext, return null; } - private static void addPermissionToPathMatcher(Map permissionCheckers, String rootPath, + private static void addPermissionToPathMatcher(Map permissionCheckers, PolicyMappingConfig policyMappingConfig, ImmutablePathMatcher.ImmutablePathMatcherBuilder> builder) { HttpSecurityPolicy checker = permissionCheckers.get(policyMappingConfig.policy); @@ -159,10 +161,6 @@ private static void addPermissionToPathMatcher(Map p if (policyMappingConfig.enabled.orElse(Boolean.TRUE)) { for (String path : policyMappingConfig.paths.orElse(Collections.emptyList())) { - path = path.trim(); - if (!path.startsWith("/")) { - path = rootPath + path; - } HttpMatcher m = new HttpMatcher(policyMappingConfig.authMechanism.orElse(null), new HashSet<>(policyMappingConfig.methods.orElse(Collections.emptyList())), checker); List perms = new ArrayList<>(); diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/ImmutablePathMatcher.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/ImmutablePathMatcher.java index 25f3052d5bbcc..81b6d47beead6 100644 --- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/ImmutablePathMatcher.java +++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/ImmutablePathMatcher.java @@ -132,6 +132,8 @@ public static class ImmutablePathMatcherBuilder { private final Map additionalExactPathMatches = new HashMap<>(); private final Map> pathsWithWildcard = new HashMap<>(); private BiConsumer handlerAccumulator; + private String rootPath; + private boolean empty = true; private ImmutablePathMatcherBuilder() { } @@ -146,9 +148,22 @@ public ImmutablePathMatcherBuilder handlerAccumulator(BiConsumer handle return this; } + public boolean hasPaths() { + return !empty; + } + + /** + * @param rootPath Path to which relative patterns (paths not starting with a separator) are linked. + * @return ImmutablePathMatcherBuilder + */ + public ImmutablePathMatcherBuilder rootPath(String rootPath) { + this.rootPath = rootPath; + return this; + } + public ImmutablePathMatcher build() { T defaultHandler = null; - SubstringMap paths = new SubstringMap<>(); + var paths = ImmutableSubstringMap. builder(); boolean hasPathWithInnerWildcard = false; // process paths with a wildcard first, that way we only create inner path matcher when really needed for (Path p : pathsWithWildcard.values()) { @@ -200,7 +215,7 @@ public void accept(SubstringMatch match1, SubstringMatch match2) { exactPathMatches.putIfAbsent(e.getKey(), e.getValue()); } int[] lengths = buildLengths(paths.keys()); - return new ImmutablePathMatcher<>(defaultHandler, paths.asImmutableMap(), exactPathMatches, lengths, + return new ImmutablePathMatcher<>(defaultHandler, paths.build(), exactPathMatches, lengths, hasPathWithInnerWildcard); } @@ -227,6 +242,13 @@ public void accept(SubstringMatch match1, SubstringMatch match2) { * @return self */ public ImmutablePathMatcherBuilder addPath(String path, T handler) { + if (empty) { + empty = false; + } + path = path.trim(); + if (rootPath != null && !path.startsWith("/")) { + path = rootPath + path; + } return addPath(path, path, handler); } @@ -363,13 +385,6 @@ public void addPrefixPath(T prefixPathHandler, BiConsumer handlerAccumulat } } - private static class PathWithInnerWildcard { - private final String remaining; - private final T handler; - - private PathWithInnerWildcard(String remaining, T handler) { - this.remaining = remaining; - this.handler = handler; - } + private record PathWithInnerWildcard(String remaining, T handler) { } } diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/ImmutableSubstringMap.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/ImmutableSubstringMap.java index fd0e572b83cfd..d765a1afdb9a5 100644 --- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/ImmutableSubstringMap.java +++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/ImmutableSubstringMap.java @@ -1,6 +1,8 @@ package io.quarkus.vertx.http.runtime.security; import java.util.Arrays; +import java.util.Iterator; +import java.util.NoSuchElementException; import io.quarkus.vertx.http.runtime.security.ImmutablePathMatcher.PathMatch; @@ -132,4 +134,101 @@ boolean hasSubPathMatcher() { return hasSubPathMatcher; } } + + static SubstringMapBuilder builder() { + return new SubstringMapBuilder<>(); + } + + static final class SubstringMapBuilder { + private Object[] table = new Object[16]; + private int size; + + private SubstringMapBuilder() { + } + + void put(String key, V value, ImmutablePathMatcher> subPathMatcher) { + if (key == null) { + throw new NullPointerException(); + } + + Object[] newTable; + if (table.length / (double) size < 4 && table.length != Integer.MAX_VALUE) { + newTable = new Object[table.length << 1]; + for (int i = 0; i < table.length; i += 2) { + if (table[i] != null) { + doPut(newTable, (String) table[i], table[i + 1]); + } + } + } else { + newTable = new Object[table.length]; + System.arraycopy(table, 0, newTable, 0, table.length); + } + doPut(newTable, key, new SubstringMatch<>(key, value, subPathMatcher)); + this.table = newTable; + size++; + } + + private void doPut(Object[] newTable, String key, Object value) { + int hash = hash(key, key.length()); + int pos = tablePos(newTable, hash); + while (newTable[pos] != null && !newTable[pos].equals(key)) { + pos += 2; + if (pos >= newTable.length) { + pos = 0; + } + } + newTable[pos] = key; + newTable[pos + 1] = value; + } + + public Iterable keys() { + return new Iterable() { + @Override + public Iterator iterator() { + final Object[] tMap = table; + int i = 0; + while (i < table.length && tMap[i] == null) { + i += 2; + } + final int startPos = i; + + return new Iterator() { + + private Object[] map = tMap; + + private int pos = startPos; + + @Override + public boolean hasNext() { + return pos < table.length; + } + + @Override + public String next() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + String ret = (String) map[pos]; + + pos += 2; + while (pos < table.length && tMap[pos] == null) { + pos += 2; + } + return ret; + } + + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + }; + } + }; + + } + + ImmutableSubstringMap build() { + return new ImmutableSubstringMap<>(table); + } + } } diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/PathMatcher.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/PathMatcher.java deleted file mode 100644 index c069fe2645a0c..0000000000000 --- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/PathMatcher.java +++ /dev/null @@ -1,223 +0,0 @@ -package io.quarkus.vertx.http.runtime.security; - -import java.util.Comparator; -import java.util.Map; -import java.util.Set; -import java.util.TreeSet; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; - -import io.quarkus.vertx.http.runtime.security.ImmutableSubstringMap.SubstringMatch; - -/** - * Handler that dispatches to a given handler based of a prefix match of the path. - *

- * This only matches a single level of a request, e.g. if you have a request that takes the form: - *

- * /foo/bar - *

- * - * @author Stuart Douglas - * - * @deprecated use {@link ImmutablePathMatcher} instead - */ -@Deprecated -public class PathMatcher { - - private static final String STRING_PATH_SEPARATOR = "/"; - - private volatile T defaultHandler; - private final SubstringMap paths = new SubstringMap<>(); - private final ConcurrentMap exactPathMatches = new ConcurrentHashMap<>(); - - /** - * lengths of all registered paths - */ - private volatile int[] lengths = {}; - - public PathMatcher(final T defaultHandler) { - this.defaultHandler = defaultHandler; - } - - public PathMatcher() { - } - - /** - * Matches a path against the registered handlers. - * - * @param path The relative path to match - * @return The match match. This will never be null, however if none matched its value field will be - */ - public PathMatch match(String path) { - if (!exactPathMatches.isEmpty()) { - T match = getExactPath(path); - if (match != null) { - return new PathMatch<>(path, "", match); - } - } - - int length = path.length(); - final int[] lengths = this.lengths; - for (int pathLength : lengths) { - if (pathLength == length) { - SubstringMatch next = paths.get(path, length); - if (next != null) { - return new PathMatch<>(path, "", next.getValue()); - } - } else if (pathLength < length) { - char c = path.charAt(pathLength); - if (c == '/') { - - //String part = path.substring(0, pathLength); - SubstringMatch next = paths.get(path, pathLength); - if (next != null) { - return new PathMatch<>(next.getKey(), path.substring(pathLength), next.getValue()); - } - } - } - } - return new PathMatch<>("", path, defaultHandler); - } - - /** - * Adds a path prefix and a handler for that path. If the path does not start - * with a / then one will be prepended. - *

- * The match is done on a prefix bases, so registering /foo will also match /bar. Exact - * path matches are taken into account first. - *

- * If / is specified as the path then it will replace the default handler. - * - * @param path The path - * @param handler The handler - */ - public synchronized PathMatcher addPrefixPath(final String path, final T handler) { - if (path.isEmpty()) { - throw new IllegalArgumentException("Path not specified"); - } - - if (PathMatcher.STRING_PATH_SEPARATOR.equals(path)) { - this.defaultHandler = handler; - return this; - } - - paths.put(path, handler); - - buildLengths(); - return this; - } - - public synchronized PathMatcher addExactPath(final String path, final T handler) { - if (path.isEmpty()) { - throw new IllegalArgumentException("Path not specified"); - } - exactPathMatches.put(path, handler); - return this; - } - - public T getExactPath(final String path) { - return exactPathMatches.get(path); - } - - public T getPrefixPath(final String path) { - - // enable the prefix path mechanism to return the default handler - SubstringMatch match = paths.get(path); - if (PathMatcher.STRING_PATH_SEPARATOR.equals(path) && match == null) { - return this.defaultHandler; - } - if (match == null) { - return null; - } - - // return the value for the given path - return match.getValue(); - } - - private void buildLengths() { - final Set lengths = new TreeSet<>(new Comparator() { - @Override - public int compare(Integer o1, Integer o2) { - return -o1.compareTo(o2); - } - }); - for (String p : paths.keys()) { - lengths.add(p.length()); - } - - int[] lengthArray = new int[lengths.size()]; - int pos = 0; - for (int i : lengths) { - lengthArray[pos++] = i; - } - this.lengths = lengthArray; - } - - @Deprecated - public synchronized PathMatcher removePath(final String path) { - return removePrefixPath(path); - } - - public synchronized PathMatcher removePrefixPath(final String path) { - if (path == null || path.isEmpty()) { - throw new IllegalArgumentException("Path not specified"); - } - - if (PathMatcher.STRING_PATH_SEPARATOR.equals(path)) { - defaultHandler = null; - return this; - } - - paths.remove(path); - - buildLengths(); - return this; - } - - public synchronized PathMatcher removeExactPath(final String path) { - if (path == null || path.isEmpty()) { - throw new IllegalArgumentException("Path not specified"); - } - - exactPathMatches.remove(path); - - return this; - } - - public synchronized PathMatcher clearPaths() { - paths.clear(); - exactPathMatches.clear(); - this.lengths = new int[0]; - defaultHandler = null; - return this; - } - - public Map getPaths() { - return paths.toMap(); - } - - public static final class PathMatch { - private final String matched; - private final String remaining; - private final T value; - - public PathMatch(String matched, String remaining, T value) { - this.matched = matched; - this.remaining = remaining; - this.value = value; - } - - public String getRemaining() { - return remaining; - } - - public String getMatched() { - return matched; - } - - public T getValue() { - return value; - } - } - -} diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/SubstringMap.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/SubstringMap.java deleted file mode 100644 index 75867de490fe0..0000000000000 --- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/SubstringMap.java +++ /dev/null @@ -1,221 +0,0 @@ -package io.quarkus.vertx.http.runtime.security; - -import static io.quarkus.vertx.http.runtime.security.ImmutableSubstringMap.doEquals; -import static io.quarkus.vertx.http.runtime.security.ImmutableSubstringMap.hash; -import static io.quarkus.vertx.http.runtime.security.ImmutableSubstringMap.tablePos; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.NoSuchElementException; - -import io.quarkus.vertx.http.runtime.security.ImmutableSubstringMap.SubstringMatch; - -/** - * A string keyed map that can be accessed as a substring, eliminating the need to allocate a new string - * to do a key comparison against. - *

- * This class uses linear probing and is thread safe due to copy on write semantics. As such it is not recommended - * for data that changes frequently. - *

- * This class does not actually implement the map interface to avoid implementing unnecessary operations. - * - * @author Stuart Douglas - */ -public class SubstringMap { - - private volatile Object[] table = new Object[16]; - private int size; - - /** - * @deprecated use {@link ImmutablePathMatcher} - */ - @Deprecated - public SubstringMatch get(String key, int length) { - return get(key, length, false); - } - - /** - * @deprecated use {@link ImmutablePathMatcher} - */ - @Deprecated - public SubstringMatch get(String key) { - return get(key, key.length(), false); - } - - @SuppressWarnings("unchecked") - private SubstringMatch get(String key, int length, boolean exact) { - if (key.length() < length) { - throw new IllegalArgumentException(); - } - Object[] table = this.table; - int hash = hash(key, length); - int pos = tablePos(table, hash); - int start = pos; - while (table[pos] != null) { - if (exact) { - if (table[pos].equals(key)) { - return (SubstringMatch) table[pos + 1]; - } - } else { - if (doEquals((String) table[pos], key, length)) { - return (SubstringMatch) table[pos + 1]; - } - } - pos += 2; - if (pos >= table.length) { - pos = 0; - } - if (pos == start) { - return null; - } - } - return null; - } - - /** - * @deprecated use {@link ImmutablePathMatcher} - */ - @Deprecated - public synchronized void put(String key, V value) { - put(key, value, null); - } - - void put(String key, V value, ImmutablePathMatcher> subPathMatcher) { - if (key == null) { - throw new NullPointerException(); - } - - Object[] newTable; - if (table.length / (double) size < 4 && table.length != Integer.MAX_VALUE) { - newTable = new Object[table.length << 1]; - for (int i = 0; i < table.length; i += 2) { - if (table[i] != null) { - doPut(newTable, (String) table[i], table[i + 1]); - } - } - } else { - newTable = new Object[table.length]; - System.arraycopy(table, 0, newTable, 0, table.length); - } - doPut(newTable, key, new SubstringMatch<>(key, value, subPathMatcher)); - this.table = newTable; - size++; - } - - /** - * @deprecated use {@link ImmutablePathMatcher} - */ - @Deprecated - public synchronized V remove(String key) { - if (key == null) { - throw new NullPointerException(); - } - //we just assume it is present, and always do a copy - //for this maps intended use cases as a path matcher it won't be called when - //the value is not present anyway - V value = null; - Object[] newTable = new Object[table.length]; - for (int i = 0; i < table.length; i += 2) { - if (table[i] != null && !table[i].equals(key)) { - doPut(newTable, (String) table[i], table[i + 1]); - } else if (table[i] != null) { - value = (V) table[i + 1]; - size--; - } - } - this.table = newTable; - if (value == null) { - return null; - } - return ((SubstringMatch) value).getValue(); - } - - private void doPut(Object[] newTable, String key, Object value) { - int hash = hash(key, key.length()); - int pos = tablePos(newTable, hash); - while (newTable[pos] != null && !newTable[pos].equals(key)) { - pos += 2; - if (pos >= newTable.length) { - pos = 0; - } - } - newTable[pos] = key; - newTable[pos + 1] = value; - } - - /** - * @deprecated use {@link ImmutablePathMatcher} - */ - @Deprecated - public Map toMap() { - Map map = new HashMap<>(); - Object[] t = this.table; - for (int i = 0; i < t.length; i += 2) { - if (t[i] != null) { - map.put((String) t[i], ((SubstringMatch) t[i + 1]).getValue()); - } - } - return map; - } - - /** - * @deprecated use {@link ImmutablePathMatcher} - */ - @Deprecated - public synchronized void clear() { - size = 0; - table = new Object[16]; - } - - public Iterable keys() { - return new Iterable() { - @Override - public Iterator iterator() { - final Object[] tMap = table; - int i = 0; - while (i < table.length && tMap[i] == null) { - i += 2; - } - final int startPos = i; - - return new Iterator() { - - private Object[] map = tMap; - - private int pos = startPos; - - @Override - public boolean hasNext() { - return pos < table.length; - } - - @Override - public String next() { - if (!hasNext()) { - throw new NoSuchElementException(); - } - String ret = (String) map[pos]; - - pos += 2; - while (pos < table.length && tMap[pos] == null) { - pos += 2; - } - return ret; - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - }; - } - }; - - } - - ImmutableSubstringMap asImmutableMap() { - return new ImmutableSubstringMap<>(table); - } - -} diff --git a/independent-projects/tools/registry-client/src/test/resources/catalog-config/quarkus-bom-quarkus-platform-descriptor-999-SNAPSHOT-999-SNAPSHOT.json b/independent-projects/tools/registry-client/src/test/resources/catalog-config/quarkus-bom-quarkus-platform-descriptor-999-SNAPSHOT-999-SNAPSHOT.json index 1ee6e7f002a23..973f32cb1d933 100644 --- a/independent-projects/tools/registry-client/src/test/resources/catalog-config/quarkus-bom-quarkus-platform-descriptor-999-SNAPSHOT-999-SNAPSHOT.json +++ b/independent-projects/tools/registry-client/src/test/resources/catalog-config/quarkus-bom-quarkus-platform-descriptor-999-SNAPSHOT-999-SNAPSHOT.json @@ -1023,7 +1023,7 @@ "guide" : "https://quarkus.io/guides/kafka-reactive-getting-started", "categories" : [ "messaging" ], "status" : "stable", - "config" : [ "mp.messaging.", "quarkus.reactive-messaging.", "quarkus.kafka." ], + "config" : [ "mp.messaging.", "quarkus.messaging.", "quarkus.kafka." ], "built-with-quarkus-core" : "999-SNAPSHOT", "extension-dependencies" : [ "io.quarkus:quarkus-kafka-client", "io.quarkus:quarkus-arc", "io.quarkus:quarkus-core", "io.quarkus:quarkus-caffeine", "io.quarkus:quarkus-jackson", "io.quarkus:quarkus-smallrye-reactive-messaging", "io.quarkus:quarkus-mutiny-reactive-streams-operators", "io.quarkus:quarkus-mutiny", "io.quarkus:quarkus-smallrye-context-propagation", "io.quarkus:quarkus-vertx", "io.quarkus:quarkus-netty" ] }, @@ -1038,7 +1038,7 @@ "guide" : "https://quarkus.io/guides/amqp", "categories" : [ "messaging" ], "status" : "stable", - "config" : [ "mp.messaging.", "quarkus.reactive-messaging.", "quarkus.amqp." ], + "config" : [ "mp.messaging.", "quarkus.messaging.", "quarkus.amqp." ], "built-with-quarkus-core" : "999-SNAPSHOT", "extension-dependencies" : [ "io.quarkus:quarkus-mutiny-reactive-streams-operators", "io.quarkus:quarkus-mutiny", "io.quarkus:quarkus-core", "io.quarkus:quarkus-smallrye-context-propagation", "io.quarkus:quarkus-smallrye-reactive-messaging", "io.quarkus:quarkus-arc", "io.quarkus:quarkus-vertx", "io.quarkus:quarkus-netty", "io.quarkus:quarkus-jackson" ] }, @@ -1051,7 +1051,7 @@ "keywords" : [ "mqtt", "reactive-mqtt" ], "categories" : [ "messaging" ], "status" : "preview", - "config" : [ "mp.messaging.", "quarkus.reactive-messaging." ], + "config" : [ "mp.messaging.", "quarkus.messaging." ], "built-with-quarkus-core" : "999-SNAPSHOT", "extension-dependencies" : [ "io.quarkus:quarkus-mutiny-reactive-streams-operators", "io.quarkus:quarkus-mutiny", "io.quarkus:quarkus-core", "io.quarkus:quarkus-smallrye-context-propagation", "io.quarkus:quarkus-smallrye-reactive-messaging", "io.quarkus:quarkus-arc", "io.quarkus:quarkus-vertx", "io.quarkus:quarkus-netty", "io.quarkus:quarkus-jackson" ] }, diff --git a/integration-tests/devmode/pom.xml b/integration-tests/devmode/pom.xml index 5963045aa0889..fd04d7eb2ac6b 100644 --- a/integration-tests/devmode/pom.xml +++ b/integration-tests/devmode/pom.xml @@ -51,7 +51,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-deployment + quarkus-messaging-deployment test diff --git a/integration-tests/devmode/src/test/java/io/quarkus/test/devui/DevUIReactiveMessagingJsonRPCTest.java b/integration-tests/devmode/src/test/java/io/quarkus/test/devui/DevUIReactiveMessagingJsonRPCTest.java index c96ccd7b1ffc7..29ca6f0e3b7b5 100644 --- a/integration-tests/devmode/src/test/java/io/quarkus/test/devui/DevUIReactiveMessagingJsonRPCTest.java +++ b/integration-tests/devmode/src/test/java/io/quarkus/test/devui/DevUIReactiveMessagingJsonRPCTest.java @@ -24,7 +24,7 @@ public class DevUIReactiveMessagingJsonRPCTest extends DevUIJsonRPCTest { "application.properties")); public DevUIReactiveMessagingJsonRPCTest() { - super("io.quarkus.quarkus-smallrye-reactive-messaging"); + super("io.quarkus.quarkus-messaging"); } @Test diff --git a/integration-tests/devtools/src/test/java/io/quarkus/devtools/codestarts/quarkus/QuarkusCodestartBuildIT.java b/integration-tests/devtools/src/test/java/io/quarkus/devtools/codestarts/quarkus/QuarkusCodestartBuildIT.java index 7d70784549ed7..2e867f5aa6c60 100644 --- a/integration-tests/devtools/src/test/java/io/quarkus/devtools/codestarts/quarkus/QuarkusCodestartBuildIT.java +++ b/integration-tests/devtools/src/test/java/io/quarkus/devtools/codestarts/quarkus/QuarkusCodestartBuildIT.java @@ -41,7 +41,7 @@ class QuarkusCodestartBuildIT extends PlatformAwareTestBase { "picocli-codestart", "hibernate-orm-codestart", "hibernate-orm-rest-data-codestart", - "reactive-messaging-codestart"); + "messaging-codestart"); @BeforeAll static void setUp() throws IOException { diff --git a/integration-tests/devtools/src/test/java/io/quarkus/devtools/codestarts/quarkus/ReactiveMessagingCodestartIT.java b/integration-tests/devtools/src/test/java/io/quarkus/devtools/codestarts/quarkus/ReactiveMessagingCodestartIT.java index 1385a1cfdb71a..4637ba783c67c 100644 --- a/integration-tests/devtools/src/test/java/io/quarkus/devtools/codestarts/quarkus/ReactiveMessagingCodestartIT.java +++ b/integration-tests/devtools/src/test/java/io/quarkus/devtools/codestarts/quarkus/ReactiveMessagingCodestartIT.java @@ -14,27 +14,27 @@ public class ReactiveMessagingCodestartIT { @RegisterExtension public static QuarkusCodestartTest kafkaCodestartTest = QuarkusCodestartTest.builder() - .extension(ArtifactKey.fromString("io.quarkus:quarkus-smallrye-reactive-messaging-kafka")) + .extension(ArtifactKey.fromString("io.quarkus:quarkus-messaging-kafka")) .languages(JAVA) .build(); @RegisterExtension public static QuarkusCodestartTest amqpCodestartTest = QuarkusCodestartTest.builder() - .extension(ArtifactKey.fromString("io.quarkus:quarkus-smallrye-reactive-messaging-amqp")) + .extension(ArtifactKey.fromString("io.quarkus:quarkus-messaging-amqp")) .languages(JAVA) .build(); @Test void testKafkaContent() throws Throwable { - kafkaCodestartTest.checkGeneratedSource("org.acme.MyReactiveMessagingApplication"); - kafkaCodestartTest.checkGeneratedTestSource("org.acme.MyReactiveMessagingApplicationTest"); + kafkaCodestartTest.checkGeneratedSource("org.acme.MyMessagingApplication"); + kafkaCodestartTest.checkGeneratedTestSource("org.acme.MyMessagingApplicationTest"); kafkaCodestartTest.assertThatGeneratedFileMatchSnapshot(JAVA, "src/main/resources/application.properties"); } @Test void testAMQPContent() throws Throwable { - amqpCodestartTest.checkGeneratedSource("org.acme.MyReactiveMessagingApplication"); - amqpCodestartTest.checkGeneratedTestSource("org.acme.MyReactiveMessagingApplicationTest"); + amqpCodestartTest.checkGeneratedSource("org.acme.MyMessagingApplication"); + amqpCodestartTest.checkGeneratedTestSource("org.acme.MyMessagingApplicationTest"); amqpCodestartTest.assertThatGeneratedFileMatchSnapshot(JAVA, "src/main/resources/application.properties"); } diff --git a/integration-tests/devtools/src/test/java/io/quarkus/devtools/commands/AbstractRemoveExtensionsTest.java b/integration-tests/devtools/src/test/java/io/quarkus/devtools/commands/AbstractRemoveExtensionsTest.java index f6443c8d53829..382a4ba52e60e 100644 --- a/integration-tests/devtools/src/test/java/io/quarkus/devtools/commands/AbstractRemoveExtensionsTest.java +++ b/integration-tests/devtools/src/test/java/io/quarkus/devtools/commands/AbstractRemoveExtensionsTest.java @@ -76,17 +76,17 @@ void testRegexpMatches() throws Exception { Assertions.assertTrue(result2.getBooleanValue(RemoveExtensions.OUTCOME_UPDATED)); final T project = readProject(); - hasNoDependency(project, "quarkus-smallrye-reactive-messaging"); + hasNoDependency(project, "quarkus-messaging"); hasNoDependency(project, "quarkus-smallrye-reactive-streams-operators"); hasNoDependency(project, "quarkus-smallrye-opentracing"); hasNoDependency(project, "quarkus-smallrye-metrics"); - hasNoDependency(project, "quarkus-smallrye-reactive-messaging-kafka"); + hasNoDependency(project, "quarkus-messaging-kafka"); hasNoDependency(project, "quarkus-smallrye-health"); hasNoDependency(project, "quarkus-smallrye-openapi"); hasNoDependency(project, "quarkus-smallrye-jwt"); hasNoDependency(project, "quarkus-smallrye-context-propagation"); hasNoDependency(project, "quarkus-smallrye-reactive-type-converters"); - hasNoDependency(project, "quarkus-smallrye-reactive-messaging-amqp"); + hasNoDependency(project, "quarkus-messaging-amqp"); hasNoDependency(project, "quarkus-smallrye-fault-tolerance"); } diff --git a/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testKafkaContent/src_main_java_ilove_quark_us_MyReactiveMessagingApplication.java b/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testAMQPContent/src_main_java_ilove_quark_us_MyMessagingApplication.java similarity index 91% rename from integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testKafkaContent/src_main_java_ilove_quark_us_MyReactiveMessagingApplication.java rename to integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testAMQPContent/src_main_java_ilove_quark_us_MyMessagingApplication.java index 1b6e4b05161cf..c32aef46fa8ee 100644 --- a/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testKafkaContent/src_main_java_ilove_quark_us_MyReactiveMessagingApplication.java +++ b/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testAMQPContent/src_main_java_ilove_quark_us_MyMessagingApplication.java @@ -9,7 +9,7 @@ import java.util.stream.Stream; @ApplicationScoped -public class MyReactiveMessagingApplication { +public class MyMessagingApplication { @Inject @Channel("words-out") @@ -20,7 +20,7 @@ public class MyReactiveMessagingApplication { * Messages are sent to the broker. **/ void onStart(@Observes StartupEvent ev) { - Stream.of("Hello", "with", "SmallRye", "reactive", "message").forEach(string -> emitter.send(string)); + Stream.of("Hello", "with", "Quarkus", "Messaging", "message").forEach(string -> emitter.send(string)); } /** diff --git a/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testAMQPContent/src_test_java_ilove_quark_us_MyReactiveMessagingApplicationTest.java b/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testAMQPContent/src_test_java_ilove_quark_us_MyMessagingApplicationTest.java similarity index 87% rename from integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testAMQPContent/src_test_java_ilove_quark_us_MyReactiveMessagingApplicationTest.java rename to integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testAMQPContent/src_test_java_ilove_quark_us_MyMessagingApplicationTest.java index 6f0a5ac2895ca..2141299f2a62d 100644 --- a/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testAMQPContent/src_test_java_ilove_quark_us_MyReactiveMessagingApplicationTest.java +++ b/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testAMQPContent/src_test_java_ilove_quark_us_MyMessagingApplicationTest.java @@ -12,10 +12,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals; @QuarkusTest -class MyReactiveMessagingApplicationTest { +class MyMessagingApplicationTest { @Inject - MyReactiveMessagingApplication application; + MyMessagingApplication application; @Test void test() { diff --git a/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testAMQPContent/src_main_java_ilove_quark_us_MyReactiveMessagingApplication.java b/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testKafkaContent/src_main_java_ilove_quark_us_MyMessagingApplication.java similarity index 91% rename from integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testAMQPContent/src_main_java_ilove_quark_us_MyReactiveMessagingApplication.java rename to integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testKafkaContent/src_main_java_ilove_quark_us_MyMessagingApplication.java index 1b6e4b05161cf..c32aef46fa8ee 100644 --- a/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testAMQPContent/src_main_java_ilove_quark_us_MyReactiveMessagingApplication.java +++ b/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testKafkaContent/src_main_java_ilove_quark_us_MyMessagingApplication.java @@ -9,7 +9,7 @@ import java.util.stream.Stream; @ApplicationScoped -public class MyReactiveMessagingApplication { +public class MyMessagingApplication { @Inject @Channel("words-out") @@ -20,7 +20,7 @@ public class MyReactiveMessagingApplication { * Messages are sent to the broker. **/ void onStart(@Observes StartupEvent ev) { - Stream.of("Hello", "with", "SmallRye", "reactive", "message").forEach(string -> emitter.send(string)); + Stream.of("Hello", "with", "Quarkus", "Messaging", "message").forEach(string -> emitter.send(string)); } /** diff --git a/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testKafkaContent/src_test_java_ilove_quark_us_MyReactiveMessagingApplicationTest.java b/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testKafkaContent/src_test_java_ilove_quark_us_MyMessagingApplicationTest.java similarity index 87% rename from integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testKafkaContent/src_test_java_ilove_quark_us_MyReactiveMessagingApplicationTest.java rename to integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testKafkaContent/src_test_java_ilove_quark_us_MyMessagingApplicationTest.java index 6f0a5ac2895ca..2141299f2a62d 100644 --- a/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testKafkaContent/src_test_java_ilove_quark_us_MyReactiveMessagingApplicationTest.java +++ b/integration-tests/devtools/src/test/resources/__snapshots__/ReactiveMessagingCodestartIT/testKafkaContent/src_test_java_ilove_quark_us_MyMessagingApplicationTest.java @@ -12,10 +12,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals; @QuarkusTest -class MyReactiveMessagingApplicationTest { +class MyMessagingApplicationTest { @Inject - MyReactiveMessagingApplication application; + MyMessagingApplication application; @Test void test() { diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/fk/issue35812/SomeEntity.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/fk/issue35812/SomeEntity.java new file mode 100644 index 0000000000000..5fbc4852341cc --- /dev/null +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/fk/issue35812/SomeEntity.java @@ -0,0 +1,10 @@ +package io.quarkus.it.panache.fk.issue35812; + +import jakarta.persistence.Entity; + +import io.quarkus.hibernate.orm.panache.PanacheEntity; + +@Entity +public class SomeEntity extends PanacheEntity { + public String string; +} diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TestTransactionTest.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TestTransactionTest.java index 4da5e4850b92b..d3f93c057512c 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TestTransactionTest.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TestTransactionTest.java @@ -5,6 +5,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; +import io.quarkus.it.panache.fk.issue35812.SomeEntity; import io.quarkus.test.TestTransaction; import io.quarkus.test.junit.QuarkusTest; @@ -39,6 +40,11 @@ public void test3() { Assertions.assertEquals(0, Beer.find("name", "Lager").count()); } + @Test + public void test4() { + Assertions.assertEquals(0, SomeEntity.findAll().count()); + } + void intentionallyNonPrivateHelperMethod() { } } diff --git a/integration-tests/kafka-oauth-keycloak/pom.xml b/integration-tests/kafka-oauth-keycloak/pom.xml index 07ed528a2d238..91314691c89ca 100644 --- a/integration-tests/kafka-oauth-keycloak/pom.xml +++ b/integration-tests/kafka-oauth-keycloak/pom.xml @@ -36,7 +36,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-messaging-kafka @@ -98,7 +98,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka-deployment + quarkus-messaging-kafka-deployment ${project.version} pom test diff --git a/integration-tests/kafka-sasl-elytron/pom.xml b/integration-tests/kafka-sasl-elytron/pom.xml index 925ea06b60a6e..0aa1c18ec473b 100644 --- a/integration-tests/kafka-sasl-elytron/pom.xml +++ b/integration-tests/kafka-sasl-elytron/pom.xml @@ -36,7 +36,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-messaging-kafka @@ -89,7 +89,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka-deployment + quarkus-messaging-kafka-deployment ${project.version} pom test diff --git a/integration-tests/kubernetes/quarkus-standard-way-kafka/pom.xml b/integration-tests/kubernetes/quarkus-standard-way-kafka/pom.xml index 5ae7b23635e79..fefc9e6d1d859 100644 --- a/integration-tests/kubernetes/quarkus-standard-way-kafka/pom.xml +++ b/integration-tests/kubernetes/quarkus-standard-way-kafka/pom.xml @@ -29,7 +29,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-messaging-kafka io.quarkus @@ -131,7 +131,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka-deployment + quarkus-messaging-kafka-deployment ${project.version} pom test diff --git a/integration-tests/oidc-tenancy/src/main/java/io/quarkus/it/keycloak/CustomTenantResolver.java b/integration-tests/oidc-tenancy/src/main/java/io/quarkus/it/keycloak/CustomTenantResolver.java index 11a58bb552cd2..b96c7e6bfec02 100644 --- a/integration-tests/oidc-tenancy/src/main/java/io/quarkus/it/keycloak/CustomTenantResolver.java +++ b/integration-tests/oidc-tenancy/src/main/java/io/quarkus/it/keycloak/CustomTenantResolver.java @@ -1,5 +1,8 @@ package io.quarkus.it.keycloak; +import java.util.function.Predicate; +import java.util.stream.Stream; + import jakarta.enterprise.context.ApplicationScoped; import io.quarkus.oidc.TenantResolver; @@ -9,11 +12,14 @@ @ApplicationScoped public class CustomTenantResolver implements TenantResolver { + private static final Predicate USE_DEFAULT_STATIC_RESOLVER = path -> Stream + .of("/api/tenant-echo", "/api/tenant-paths/") + .anyMatch(path::contains); + @Override public String resolve(RoutingContext context) { - if (context.request().path().contains("/api/tenant-echo")) { - // do what DefaultStaticTenantResolver does so that we can test @Tenant - return context.get(OidcUtils.TENANT_ID_ATTRIBUTE); + if (USE_DEFAULT_STATIC_RESOLVER.test(context.request().path())) { + return null; } // Make sure this resolver is called only once during a given request if (context.get("static_config_resolved") != null) { diff --git a/integration-tests/oidc-tenancy/src/main/java/io/quarkus/it/keycloak/TenantPathsResource.java b/integration-tests/oidc-tenancy/src/main/java/io/quarkus/it/keycloak/TenantPathsResource.java new file mode 100644 index 0000000000000..909f6201dc063 --- /dev/null +++ b/integration-tests/oidc-tenancy/src/main/java/io/quarkus/it/keycloak/TenantPathsResource.java @@ -0,0 +1,67 @@ +package io.quarkus.it.keycloak; + +import jakarta.annotation.security.PermitAll; +import jakarta.enterprise.event.Observes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; + +import io.quarkus.security.Authenticated; +import io.vertx.ext.web.Router; + +@Authenticated +@Path("api/tenant-paths") +public class TenantPathsResource { + + @PermitAll + void observe(@Observes Router router) { + router.route().order(0).handler(rc -> { + if (rc.request().path().equals("/api/tenant-paths///public-key//match")) { + rc.end("public-key"); + } else { + rc.next(); + } + }); + } + + @GET + @Path("tenant-b/default") + public String defaultTenant() { + return "default"; + } + + @GET + @Path("tenant-b/default-b") + public String tenantB2() { + return "tenant-b"; + } + + @GET + @Path("tenant-b/public-key") + public String tenantB3() { + return "tenant-b"; + } + + @GET + @Path("tenant-c/public-key") + public String tenantPublicKey() { + return "public-key"; + } + + @GET + @Path("public-key/match") + public String tenantPublicKey2() { + return "public-key"; + } + + @GET + @Path("public-key-c/match") + public String defaultTenant2() { + return "public-key"; + } + + @GET + @Path("tenant-b") + public String tenantB() { + return "tenant-b"; + } +} diff --git a/integration-tests/oidc-tenancy/src/main/resources/application.properties b/integration-tests/oidc-tenancy/src/main/resources/application.properties index 6034f53577352..9cd3b8499e0cb 100644 --- a/integration-tests/oidc-tenancy/src/main/resources/application.properties +++ b/integration-tests/oidc-tenancy/src/main/resources/application.properties @@ -10,6 +10,7 @@ quarkus.oidc.token-cache.max-size=3 quarkus.oidc.client-id=quarkus-app-a quarkus.oidc.credentials.secret=secret quarkus.oidc.application-type=service +quarkus.oidc.tenant-paths=/api/tenant-paths/tenant-b/default # Oidc Client quarkus.test.native-image-profile=test @@ -20,6 +21,7 @@ quarkus.oidc.tenant-b.client-id=quarkus-app-b quarkus.oidc.tenant-b.credentials.secret=secret quarkus.oidc.tenant-b.token.issuer=${keycloak.url}/realms/quarkus-b quarkus.oidc.tenant-b.application-type=service +quarkus.oidc.tenant-b.tenant-paths=/api/tenant-paths/tenant-b* # Tenant B - 2 clients quarkus.oidc.tenant-b2.auth-server-url=${keycloak.url}/realms/quarkus-b @@ -121,6 +123,9 @@ quarkus.oidc.tenant-requiredclaim.token.required-claims.azp=quarkus-app-b quarkus.oidc.tenant-public-key.client-id=test quarkus.oidc.tenant-public-key.public-key=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlivFI8qB4D0y2jy0CfEqFyy46R0o7S8TKpsx5xbHKoU1VWg6QkQm+ntyIv1p4kE1sPEQO73+HY8+Bzs75XwRTYL1BmR1w8J5hmjVWjc6R2BTBGAYRPFRhor3kpM6ni2SPmNNhurEAHw7TaqszP5eUF/F9+KEBWkwVta+PZ37bwqSE4sCb1soZFrVz/UT/LF4tYpuVYt3YbqToZ3pZOZ9AX2o1GCG3xwOjkc4x0W7ezbQZdC9iftPxVHR8irOijJRRjcPDtA6vPKpzLl6CyYnsIYPd99ltwxTHjr3npfv/3Lw50bAkbT4HeLFxTx4flEoZLKO/g0bAoV2uqBhkA9xnQIDAQAB +quarkus.oidc.tenant-public-key.tenant-paths=/api/tenant-paths/*/public-key,/api/tenant-paths/public-key/* +quarkus.http.auth.permission.authenticated.paths=/api/tenant-paths/public-key/match +quarkus.http.auth.permission.authenticated.policy=authenticated smallrye.jwt.sign.key.location=/privateKey.pem smallrye.jwt.new-token.lifespan=5 diff --git a/integration-tests/oidc-tenancy/src/test/java/io/quarkus/it/keycloak/AnnotationBasedTenantTest.java b/integration-tests/oidc-tenancy/src/test/java/io/quarkus/it/keycloak/AnnotationBasedTenantTest.java index 2dc353245f789..1d53ce36f731d 100644 --- a/integration-tests/oidc-tenancy/src/test/java/io/quarkus/it/keycloak/AnnotationBasedTenantTest.java +++ b/integration-tests/oidc-tenancy/src/test/java/io/quarkus/it/keycloak/AnnotationBasedTenantTest.java @@ -80,7 +80,7 @@ public void testJaxRsIdentityAugmentation() { .body(Matchers.equalTo(("tenant-id=tenant-public-key, static.tenant.id=tenant-public-key, name=alice"))); } - private static String getTokenWithRole(String... roles) { + static String getTokenWithRole(String... roles) { return Jwt.claim("scope", "read:data").preferredUserName("alice").groups(Set.of(roles)).sign(); } } diff --git a/integration-tests/oidc-tenancy/src/test/java/io/quarkus/it/keycloak/BearerTokenAuthorizationTest.java b/integration-tests/oidc-tenancy/src/test/java/io/quarkus/it/keycloak/BearerTokenAuthorizationTest.java index 12fe6f454dd4e..baa0238a4caec 100644 --- a/integration-tests/oidc-tenancy/src/test/java/io/quarkus/it/keycloak/BearerTokenAuthorizationTest.java +++ b/integration-tests/oidc-tenancy/src/test/java/io/quarkus/it/keycloak/BearerTokenAuthorizationTest.java @@ -30,7 +30,11 @@ import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.keycloak.client.KeycloakTestClient; import io.restassured.RestAssured; +import io.vertx.core.http.HttpMethod; import io.vertx.core.json.JsonObject; +import io.vertx.mutiny.core.Vertx; +import io.vertx.mutiny.core.buffer.Buffer; +import io.vertx.mutiny.core.http.HttpClient; /** * @author Pedro Igor @@ -685,6 +689,85 @@ public void testOpaqueTokenScopePermission() { .statusCode(403); } + @Test + public void testResolveStaticTenantsByPathPatterns() { + // default tenant path pattern is more specific, therefore it wins over tenant-b pattern that is also matched + assertStaticTenantSuccess("a", "default", "tenant-b/default"); + assertStaticTenantFailure("a", "tenant-b/default-b"); + assertStaticTenantFailure("a", "tenant-b/default-b/"); + assertStaticTenantFailure("b", "tenant-b/default"); + assertStaticTenantFailure("b", "tenant-b/default/"); + assertStaticTenantSuccess("b", "tenant-b", "tenant-b"); + assertStaticTenantSuccess("b", "tenant-b", "tenant-b/"); + assertStaticTenantSuccess("b", "tenant-b", "tenant-b/default-b"); + assertStaticTenantSuccess("b", "tenant-b", "tenant-b/default-b/"); + assertStaticTenantSuccess("b", "tenant-b", "tenant-b/public-key"); + assertStaticTenantSuccess("b", "tenant-b", "tenant-b/public-key"); + assertStaticTenantFailure("public-key", "tenant-b/public-key"); + assertStaticTenantFailure("public-key", "tenant-b/public-key/"); + assertStaticTenantSuccess("public-key", "public-key", "tenant-c/public-key"); + assertStaticTenantSuccess("public-key", "public-key", "tenant-c/public-key/"); + assertStaticTenantSuccess("public-key", "public-key", "public-key/match"); + assertStaticTenantSuccess("public-key", "public-key", "public-key/match/"); + assertStaticTenantFailure("b", "public-key/match"); + assertStaticTenantFailure("b", "public-key/match/"); + assertStaticTenantFailure("public-key", "public-key-c/match"); + assertStaticTenantFailure("public-key", "public-key-c/match/"); + assertStaticTenantSuccess("a", "public-key", "public-key-c/match"); + + // assert path is normalized and tenant is selected by path-matching pattern before HTTP perms are checked + Vertx vertx = Vertx.vertx(); + HttpClient httpClient = null; + try { + httpClient = vertx.createHttpClient(); + httpClient + .request(HttpMethod.GET, RestAssured.port, URI.create(RestAssured.baseURI).getHost(), + "/api/tenant-paths///public-key//match") + .flatMap(r -> r.putHeader("Authorization", "Bearer " + getAccessToken("public-key")).send()) + .flatMap(r -> { + assertEquals(200, r.statusCode()); + return r.body(); + }) + .map(Buffer::toString) + .invoke(b -> assertEquals("public-key", b)) + .await().indefinitely(); + httpClient + .request(HttpMethod.GET, RestAssured.port, URI.create(RestAssured.baseURI).getHost(), + "/api/tenant-paths///public-key//match") + .flatMap(r -> r.putHeader("Authorization", "Bearer " + getAccessToken("b")).send()) + .invoke(r -> assertEquals(401, r.statusCode())) + .await().indefinitely(); + } finally { + if (httpClient != null) { + httpClient.closeAndAwait(); + } + vertx.closeAndAwait(); + } + } + + private void assertStaticTenantSuccess(String clientId, String tenant, String subPath) { + // tenant is resolved based on path pattern and access token is valid + final String accessToken = getAccessToken(clientId); + RestAssured.given().auth().oauth2(accessToken).when().get("/api/tenant-paths/" + subPath).then().statusCode(200) + .body(equalTo(tenant)); + } + + private String getAccessToken(String clientId) { + final String accessToken; + if ("public-key".equals(clientId)) { + accessToken = AnnotationBasedTenantTest.getTokenWithRole(); + } else { + accessToken = getAccessToken("alice", clientId); + } + return accessToken; + } + + private void assertStaticTenantFailure(String clientId, String subPath) { + // tenant is not resolved based on path pattern or access token is not valid + final String accessToken = getAccessToken(clientId); + RestAssured.given().auth().oauth2(accessToken).when().get("/api/tenant-paths/" + subPath).then().statusCode(401); + } + private String getAccessToken(String userName, String clientId) { return getAccessToken(userName, clientId, clientId); } diff --git a/integration-tests/opentelemetry-reactive-messaging/pom.xml b/integration-tests/opentelemetry-reactive-messaging/pom.xml index bbe33f7c0078f..b6b2ea69c2eea 100644 --- a/integration-tests/opentelemetry-reactive-messaging/pom.xml +++ b/integration-tests/opentelemetry-reactive-messaging/pom.xml @@ -32,7 +32,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-messaging-kafka @@ -105,7 +105,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka-deployment + quarkus-messaging-kafka-deployment ${project.version} pom test diff --git a/integration-tests/reactive-messaging-amqp/pom.xml b/integration-tests/reactive-messaging-amqp/pom.xml index 2ccd4e67e7cf8..5792ae53b0bdd 100644 --- a/integration-tests/reactive-messaging-amqp/pom.xml +++ b/integration-tests/reactive-messaging-amqp/pom.xml @@ -36,7 +36,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-amqp + quarkus-messaging-amqp @@ -108,7 +108,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-amqp-deployment + quarkus-messaging-amqp-deployment ${project.version} pom test diff --git a/integration-tests/reactive-messaging-hibernate-orm/pom.xml b/integration-tests/reactive-messaging-hibernate-orm/pom.xml index 4b3e79776b129..f5409927470a1 100644 --- a/integration-tests/reactive-messaging-hibernate-orm/pom.xml +++ b/integration-tests/reactive-messaging-hibernate-orm/pom.xml @@ -54,7 +54,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-messaging-kafka @@ -160,7 +160,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka-deployment + quarkus-messaging-kafka-deployment ${project.version} pom test diff --git a/integration-tests/reactive-messaging-hibernate-reactive/pom.xml b/integration-tests/reactive-messaging-hibernate-reactive/pom.xml index 559de521da6f7..029a927dce98f 100644 --- a/integration-tests/reactive-messaging-hibernate-reactive/pom.xml +++ b/integration-tests/reactive-messaging-hibernate-reactive/pom.xml @@ -54,7 +54,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-messaging-kafka @@ -165,7 +165,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka-deployment + quarkus-messaging-kafka-deployment ${project.version} pom test diff --git a/integration-tests/reactive-messaging-kafka/pom.xml b/integration-tests/reactive-messaging-kafka/pom.xml index 5227f16834072..42729bca10004 100644 --- a/integration-tests/reactive-messaging-kafka/pom.xml +++ b/integration-tests/reactive-messaging-kafka/pom.xml @@ -60,7 +60,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-messaging-kafka @@ -169,7 +169,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka-deployment + quarkus-messaging-kafka-deployment ${project.version} pom test diff --git a/integration-tests/reactive-messaging-mqtt/pom.xml b/integration-tests/reactive-messaging-mqtt/pom.xml index 9ed9dafea96ff..c23a2b353df1f 100644 --- a/integration-tests/reactive-messaging-mqtt/pom.xml +++ b/integration-tests/reactive-messaging-mqtt/pom.xml @@ -45,7 +45,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-mqtt + quarkus-messaging-mqtt @@ -128,7 +128,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-mqtt-deployment + quarkus-messaging-mqtt-deployment ${project.version} pom test diff --git a/integration-tests/reactive-messaging-pulsar/pom.xml b/integration-tests/reactive-messaging-pulsar/pom.xml index 22bc4d58ff1c3..98cf5bdf5dc7d 100644 --- a/integration-tests/reactive-messaging-pulsar/pom.xml +++ b/integration-tests/reactive-messaging-pulsar/pom.xml @@ -51,7 +51,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-pulsar + quarkus-messaging-pulsar @@ -158,7 +158,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-pulsar-deployment + quarkus-messaging-pulsar-deployment ${project.version} pom test diff --git a/integration-tests/reactive-messaging-rabbitmq-dyn/pom.xml b/integration-tests/reactive-messaging-rabbitmq-dyn/pom.xml index b299f4bbe8bc8..817b1f1ed3dfb 100644 --- a/integration-tests/reactive-messaging-rabbitmq-dyn/pom.xml +++ b/integration-tests/reactive-messaging-rabbitmq-dyn/pom.xml @@ -45,7 +45,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-rabbitmq + quarkus-messaging-rabbitmq @@ -138,7 +138,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-rabbitmq-deployment + quarkus-messaging-rabbitmq-deployment ${project.version} pom test diff --git a/integration-tests/reactive-messaging-rabbitmq/pom.xml b/integration-tests/reactive-messaging-rabbitmq/pom.xml index 888f22ed73fee..802395ed095f6 100644 --- a/integration-tests/reactive-messaging-rabbitmq/pom.xml +++ b/integration-tests/reactive-messaging-rabbitmq/pom.xml @@ -45,7 +45,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-rabbitmq + quarkus-messaging-rabbitmq @@ -128,7 +128,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-rabbitmq-deployment + quarkus-messaging-rabbitmq-deployment ${project.version} pom test diff --git a/integration-tests/resteasy-reactive-kotlin/standard/pom.xml b/integration-tests/resteasy-reactive-kotlin/standard/pom.xml index c18476ddf4217..b20e5a1f5192f 100644 --- a/integration-tests/resteasy-reactive-kotlin/standard/pom.xml +++ b/integration-tests/resteasy-reactive-kotlin/standard/pom.xml @@ -25,7 +25,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-messaging-kafka io.quarkus @@ -136,7 +136,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka-deployment + quarkus-messaging-kafka-deployment ${project.version} pom test diff --git a/integration-tests/virtual-threads/amqp-virtual-threads/pom.xml b/integration-tests/virtual-threads/amqp-virtual-threads/pom.xml index 53fdd40390082..c3968ff328807 100644 --- a/integration-tests/virtual-threads/amqp-virtual-threads/pom.xml +++ b/integration-tests/virtual-threads/amqp-virtual-threads/pom.xml @@ -20,7 +20,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-amqp + quarkus-messaging-amqp io.quarkus @@ -76,7 +76,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-amqp-deployment + quarkus-messaging-amqp-deployment ${project.version} pom test diff --git a/integration-tests/virtual-threads/jms-virtual-threads/pom.xml b/integration-tests/virtual-threads/jms-virtual-threads/pom.xml index 84be917923ea1..c817ca48aecc6 100644 --- a/integration-tests/virtual-threads/jms-virtual-threads/pom.xml +++ b/integration-tests/virtual-threads/jms-virtual-threads/pom.xml @@ -31,7 +31,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging + quarkus-messaging io.smallrye.reactive @@ -100,7 +100,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-deployment + quarkus-messaging-deployment ${project.version} pom test diff --git a/integration-tests/virtual-threads/kafka-virtual-threads/pom.xml b/integration-tests/virtual-threads/kafka-virtual-threads/pom.xml index e727557b025d1..8817ad721acfc 100644 --- a/integration-tests/virtual-threads/kafka-virtual-threads/pom.xml +++ b/integration-tests/virtual-threads/kafka-virtual-threads/pom.xml @@ -20,7 +20,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-messaging-kafka io.quarkus @@ -75,7 +75,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka-deployment + quarkus-messaging-kafka-deployment ${project.version} pom test diff --git a/relocations/generaterelocations.java b/relocations/generaterelocations.java index c24b8a238a69d..8c8042e5b01f1 100755 --- a/relocations/generaterelocations.java +++ b/relocations/generaterelocations.java @@ -128,6 +128,22 @@ public class generaterelocations implements Runnable { "3.9"); RELOCATIONS.put("quarkus-spring-web-resteasy-classic", springWebRESTEasyClassicRelocation); RELOCATIONS.put("quarkus-spring-web-resteasy-classic-deployment", springWebRESTEasyClassicRelocation); + + Function smallryeReactiveMessagingRelocation = a -> Relocation.ofArtifactId(a, a.replace("smallrye-reactive-messaging", "messaging"), + "3.9"); + RELOCATIONS.put("quarkus-smallrye-reactive-messaging", smallryeReactiveMessagingRelocation); + RELOCATIONS.put("quarkus-smallrye-reactive-messaging-kotlin", smallryeReactiveMessagingRelocation); + RELOCATIONS.put("quarkus-smallrye-reactive-messaging-deployment", smallryeReactiveMessagingRelocation); + RELOCATIONS.put("quarkus-smallrye-reactive-messaging-kafka", smallryeReactiveMessagingRelocation); + RELOCATIONS.put("quarkus-smallrye-reactive-messaging-kafka-deployment", smallryeReactiveMessagingRelocation); + RELOCATIONS.put("quarkus-smallrye-reactive-messaging-pulsar", smallryeReactiveMessagingRelocation); + RELOCATIONS.put("quarkus-smallrye-reactive-messaging-pulsar-deployment", smallryeReactiveMessagingRelocation); + RELOCATIONS.put("quarkus-smallrye-reactive-messaging-amqp", smallryeReactiveMessagingRelocation); + RELOCATIONS.put("quarkus-smallrye-reactive-messaging-amqp-deployment", smallryeReactiveMessagingRelocation); + RELOCATIONS.put("quarkus-smallrye-reactive-messaging-mqtt", smallryeReactiveMessagingRelocation); + RELOCATIONS.put("quarkus-smallrye-reactive-messaging-mqtt-deployment", smallryeReactiveMessagingRelocation); + RELOCATIONS.put("quarkus-smallrye-reactive-messaging-rabbitmq", smallryeReactiveMessagingRelocation); + RELOCATIONS.put("quarkus-smallrye-reactive-messaging-rabbitmq-deployment", smallryeReactiveMessagingRelocation); } private static final String RELOCATION_POM_TEMPLATE = "\n" + // diff --git a/relocations/pom.xml b/relocations/pom.xml index 1073d83681ebb..5f147f47c930a 100644 --- a/relocations/pom.xml +++ b/relocations/pom.xml @@ -87,6 +87,19 @@ quarkus-spring-web-resteasy-reactive-deployment quarkus-spring-web-resteasy-classic quarkus-spring-web-resteasy-classic-deployment + quarkus-smallrye-reactive-messaging + quarkus-smallrye-reactive-messaging-amqp + quarkus-smallrye-reactive-messaging-amqp-deployment + quarkus-smallrye-reactive-messaging-deployment + quarkus-smallrye-reactive-messaging-kafka + quarkus-smallrye-reactive-messaging-kafka-deployment + quarkus-smallrye-reactive-messaging-kotlin + quarkus-smallrye-reactive-messaging-mqtt + quarkus-smallrye-reactive-messaging-mqtt-deployment + quarkus-smallrye-reactive-messaging-pulsar + quarkus-smallrye-reactive-messaging-pulsar-deployment + quarkus-smallrye-reactive-messaging-rabbitmq + quarkus-smallrye-reactive-messaging-rabbitmq-deployment diff --git a/relocations/quarkus-smallrye-reactive-messaging-amqp-deployment/pom.xml b/relocations/quarkus-smallrye-reactive-messaging-amqp-deployment/pom.xml new file mode 100644 index 0000000000000..1d5a8bbc879a2 --- /dev/null +++ b/relocations/quarkus-smallrye-reactive-messaging-amqp-deployment/pom.xml @@ -0,0 +1,22 @@ + + + + quarkus-relocations-parent + io.quarkus + 999-SNAPSHOT + + 4.0.0 + + quarkus-smallrye-reactive-messaging-amqp-deployment + + + + io.quarkus + quarkus-messaging-amqp-deployment + ${project.version} + Update the artifactId in your project build file. Refer to https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.9 for more information. + + + \ No newline at end of file diff --git a/relocations/quarkus-smallrye-reactive-messaging-amqp/pom.xml b/relocations/quarkus-smallrye-reactive-messaging-amqp/pom.xml new file mode 100644 index 0000000000000..aeb0a21571297 --- /dev/null +++ b/relocations/quarkus-smallrye-reactive-messaging-amqp/pom.xml @@ -0,0 +1,22 @@ + + + + quarkus-relocations-parent + io.quarkus + 999-SNAPSHOT + + 4.0.0 + + quarkus-smallrye-reactive-messaging-amqp + + + + io.quarkus + quarkus-messaging-amqp + ${project.version} + Update the artifactId in your project build file. Refer to https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.9 for more information. + + + \ No newline at end of file diff --git a/relocations/quarkus-smallrye-reactive-messaging-deployment/pom.xml b/relocations/quarkus-smallrye-reactive-messaging-deployment/pom.xml new file mode 100644 index 0000000000000..7966bbccc8326 --- /dev/null +++ b/relocations/quarkus-smallrye-reactive-messaging-deployment/pom.xml @@ -0,0 +1,22 @@ + + + + quarkus-relocations-parent + io.quarkus + 999-SNAPSHOT + + 4.0.0 + + quarkus-smallrye-reactive-messaging-deployment + + + + io.quarkus + quarkus-messaging-deployment + ${project.version} + Update the artifactId in your project build file. Refer to https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.9 for more information. + + + \ No newline at end of file diff --git a/relocations/quarkus-smallrye-reactive-messaging-kafka-deployment/pom.xml b/relocations/quarkus-smallrye-reactive-messaging-kafka-deployment/pom.xml new file mode 100644 index 0000000000000..de58d4631e3cf --- /dev/null +++ b/relocations/quarkus-smallrye-reactive-messaging-kafka-deployment/pom.xml @@ -0,0 +1,22 @@ + + + + quarkus-relocations-parent + io.quarkus + 999-SNAPSHOT + + 4.0.0 + + quarkus-smallrye-reactive-messaging-kafka-deployment + + + + io.quarkus + quarkus-messaging-kafka-deployment + ${project.version} + Update the artifactId in your project build file. Refer to https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.9 for more information. + + + \ No newline at end of file diff --git a/relocations/quarkus-smallrye-reactive-messaging-kafka/pom.xml b/relocations/quarkus-smallrye-reactive-messaging-kafka/pom.xml new file mode 100644 index 0000000000000..9187fedb03780 --- /dev/null +++ b/relocations/quarkus-smallrye-reactive-messaging-kafka/pom.xml @@ -0,0 +1,22 @@ + + + + quarkus-relocations-parent + io.quarkus + 999-SNAPSHOT + + 4.0.0 + + quarkus-smallrye-reactive-messaging-kafka + + + + io.quarkus + quarkus-messaging-kafka + ${project.version} + Update the artifactId in your project build file. Refer to https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.9 for more information. + + + \ No newline at end of file diff --git a/relocations/quarkus-smallrye-reactive-messaging-kotlin/pom.xml b/relocations/quarkus-smallrye-reactive-messaging-kotlin/pom.xml new file mode 100644 index 0000000000000..d1ada216bb5c2 --- /dev/null +++ b/relocations/quarkus-smallrye-reactive-messaging-kotlin/pom.xml @@ -0,0 +1,22 @@ + + + + quarkus-relocations-parent + io.quarkus + 999-SNAPSHOT + + 4.0.0 + + quarkus-smallrye-reactive-messaging-kotlin + + + + io.quarkus + quarkus-messaging-kotlin + ${project.version} + Update the artifactId in your project build file. Refer to https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.9 for more information. + + + \ No newline at end of file diff --git a/relocations/quarkus-smallrye-reactive-messaging-mqtt-deployment/pom.xml b/relocations/quarkus-smallrye-reactive-messaging-mqtt-deployment/pom.xml new file mode 100644 index 0000000000000..b492288ca7ec7 --- /dev/null +++ b/relocations/quarkus-smallrye-reactive-messaging-mqtt-deployment/pom.xml @@ -0,0 +1,22 @@ + + + + quarkus-relocations-parent + io.quarkus + 999-SNAPSHOT + + 4.0.0 + + quarkus-smallrye-reactive-messaging-mqtt-deployment + + + + io.quarkus + quarkus-messaging-mqtt-deployment + ${project.version} + Update the artifactId in your project build file. Refer to https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.9 for more information. + + + \ No newline at end of file diff --git a/relocations/quarkus-smallrye-reactive-messaging-mqtt/pom.xml b/relocations/quarkus-smallrye-reactive-messaging-mqtt/pom.xml new file mode 100644 index 0000000000000..0d4a43301e3fe --- /dev/null +++ b/relocations/quarkus-smallrye-reactive-messaging-mqtt/pom.xml @@ -0,0 +1,22 @@ + + + + quarkus-relocations-parent + io.quarkus + 999-SNAPSHOT + + 4.0.0 + + quarkus-smallrye-reactive-messaging-mqtt + + + + io.quarkus + quarkus-messaging-mqtt + ${project.version} + Update the artifactId in your project build file. Refer to https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.9 for more information. + + + \ No newline at end of file diff --git a/relocations/quarkus-smallrye-reactive-messaging-pulsar-deployment/pom.xml b/relocations/quarkus-smallrye-reactive-messaging-pulsar-deployment/pom.xml new file mode 100644 index 0000000000000..8f02a50a641ea --- /dev/null +++ b/relocations/quarkus-smallrye-reactive-messaging-pulsar-deployment/pom.xml @@ -0,0 +1,22 @@ + + + + quarkus-relocations-parent + io.quarkus + 999-SNAPSHOT + + 4.0.0 + + quarkus-smallrye-reactive-messaging-pulsar-deployment + + + + io.quarkus + quarkus-messaging-pulsar-deployment + ${project.version} + Update the artifactId in your project build file. Refer to https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.9 for more information. + + + \ No newline at end of file diff --git a/relocations/quarkus-smallrye-reactive-messaging-pulsar/pom.xml b/relocations/quarkus-smallrye-reactive-messaging-pulsar/pom.xml new file mode 100644 index 0000000000000..f0f6fdc543187 --- /dev/null +++ b/relocations/quarkus-smallrye-reactive-messaging-pulsar/pom.xml @@ -0,0 +1,22 @@ + + + + quarkus-relocations-parent + io.quarkus + 999-SNAPSHOT + + 4.0.0 + + quarkus-smallrye-reactive-messaging-pulsar + + + + io.quarkus + quarkus-messaging-pulsar + ${project.version} + Update the artifactId in your project build file. Refer to https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.9 for more information. + + + \ No newline at end of file diff --git a/relocations/quarkus-smallrye-reactive-messaging-rabbitmq-deployment/pom.xml b/relocations/quarkus-smallrye-reactive-messaging-rabbitmq-deployment/pom.xml new file mode 100644 index 0000000000000..1288bd735d115 --- /dev/null +++ b/relocations/quarkus-smallrye-reactive-messaging-rabbitmq-deployment/pom.xml @@ -0,0 +1,22 @@ + + + + quarkus-relocations-parent + io.quarkus + 999-SNAPSHOT + + 4.0.0 + + quarkus-smallrye-reactive-messaging-rabbitmq-deployment + + + + io.quarkus + quarkus-messaging-rabbitmq-deployment + ${project.version} + Update the artifactId in your project build file. Refer to https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.9 for more information. + + + \ No newline at end of file diff --git a/relocations/quarkus-smallrye-reactive-messaging-rabbitmq/pom.xml b/relocations/quarkus-smallrye-reactive-messaging-rabbitmq/pom.xml new file mode 100644 index 0000000000000..f426264b898d0 --- /dev/null +++ b/relocations/quarkus-smallrye-reactive-messaging-rabbitmq/pom.xml @@ -0,0 +1,22 @@ + + + + quarkus-relocations-parent + io.quarkus + 999-SNAPSHOT + + 4.0.0 + + quarkus-smallrye-reactive-messaging-rabbitmq + + + + io.quarkus + quarkus-messaging-rabbitmq + ${project.version} + Update the artifactId in your project build file. Refer to https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.9 for more information. + + + \ No newline at end of file diff --git a/relocations/quarkus-smallrye-reactive-messaging/pom.xml b/relocations/quarkus-smallrye-reactive-messaging/pom.xml new file mode 100644 index 0000000000000..fcd55ab27c6a2 --- /dev/null +++ b/relocations/quarkus-smallrye-reactive-messaging/pom.xml @@ -0,0 +1,22 @@ + + + + quarkus-relocations-parent + io.quarkus + 999-SNAPSHOT + + 4.0.0 + + quarkus-smallrye-reactive-messaging + + + + io.quarkus + quarkus-messaging + ${project.version} + Update the artifactId in your project build file. Refer to https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.9 for more information. + + + \ No newline at end of file diff --git a/tcks/microprofile-reactive-messaging/pom.xml b/tcks/microprofile-reactive-messaging/pom.xml index 3f114a2c1c5ec..323501fc0b3bd 100644 --- a/tcks/microprofile-reactive-messaging/pom.xml +++ b/tcks/microprofile-reactive-messaging/pom.xml @@ -27,7 +27,7 @@ false true - true + true @@ -57,7 +57,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging + quarkus-messaging org.eclipse.microprofile.reactive.messaging @@ -68,7 +68,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-deployment + quarkus-messaging-deployment ${project.version} pom test