From e7e82ab1ff1170eef590c3b491c8b337a0f74556 Mon Sep 17 00:00:00 2001 From: Eddie Carpenter Date: Thu, 31 Oct 2024 23:24:57 +1300 Subject: [PATCH 1/2] Added native support for the HA jDiameter by adding it to the DiameterProcessor --- .../org.jdiameter.ha/reflect-config.json | 26 ------------------- quarkus-diameter/deployment/pom.xml | 3 ++- .../deployment/DiameterProcessor.java | 6 ++++- quarkus-diameter/runtime/pom.xml | 7 ++++- 4 files changed, 13 insertions(+), 29 deletions(-) delete mode 100644 core/jdiameter-ha/impl/src/main/resources/META-INF/native-image/org.jdiameter.ha/reflect-config.json diff --git a/core/jdiameter-ha/impl/src/main/resources/META-INF/native-image/org.jdiameter.ha/reflect-config.json b/core/jdiameter-ha/impl/src/main/resources/META-INF/native-image/org.jdiameter.ha/reflect-config.json deleted file mode 100644 index 5c2add919..000000000 --- a/core/jdiameter-ha/impl/src/main/resources/META-INF/native-image/org.jdiameter.ha/reflect-config.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "name": "org.jdiameter.impl.ha.data.CachedSessionDatasourceImpl", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "queryAllPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true, - "allPublicMethods": true, - "allPublicFields": true, - "allPublicConstructors": true - }, - { - "name": "org.jdiameter.impl.ha.timer.ReplicatedTimerFacilityImpl", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "queryAllPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true, - "allPublicMethods": true, - "allPublicFields": true, - "allPublicConstructors": true - } -] diff --git a/quarkus-diameter/deployment/pom.xml b/quarkus-diameter/deployment/pom.xml index 5c9809602..127ce07a2 100644 --- a/quarkus-diameter/deployment/pom.xml +++ b/quarkus-diameter/deployment/pom.xml @@ -1,5 +1,6 @@ - + 4.0.0 diff --git a/quarkus-diameter/deployment/src/main/java/io/quarkiverse/diameter/deployment/DiameterProcessor.java b/quarkus-diameter/deployment/src/main/java/io/quarkiverse/diameter/deployment/DiameterProcessor.java index 2a8130679..b71f15dbb 100644 --- a/quarkus-diameter/deployment/src/main/java/io/quarkiverse/diameter/deployment/DiameterProcessor.java +++ b/quarkus-diameter/deployment/src/main/java/io/quarkiverse/diameter/deployment/DiameterProcessor.java @@ -42,6 +42,8 @@ import org.jdiameter.common.impl.statistic.StatisticProcessorImpl; import org.jdiameter.common.impl.timer.LocalTimerFacilityImpl; import org.jdiameter.common.impl.validation.DictionaryImpl; +import org.jdiameter.impl.ha.data.CachedSessionDatasourceImpl; +import org.jdiameter.impl.ha.timer.ReplicatedTimerFacilityImpl; import org.jdiameter.server.impl.*; import org.jdiameter.server.impl.agent.AgentConfigurationImpl; import org.jdiameter.server.impl.agent.ProxyAgentImpl; @@ -116,7 +118,9 @@ ReflectiveClassBuildItem reflection() AssemblerImpl.class, MessageParser.class, WeightedRoundRobinRouter.class, - WeightedLeastConnectionsRouter.class + WeightedLeastConnectionsRouter.class, + CachedSessionDatasourceImpl.class, + ReplicatedTimerFacilityImpl.class ) .methods() .fields() diff --git a/quarkus-diameter/runtime/pom.xml b/quarkus-diameter/runtime/pom.xml index db150c4bb..297d15143 100644 --- a/quarkus-diameter/runtime/pom.xml +++ b/quarkus-diameter/runtime/pom.xml @@ -1,5 +1,6 @@ - + 4.0.0 @@ -37,6 +38,10 @@ io.quarkiverse.jdiameter jdiameter-impl + + io.quarkiverse.jdiameter + jdiameter-ha-impl + From 13ec21b02c4af88a198faef60e1c04d41122c8e9 Mon Sep 17 00:00:00 2001 From: Eddie Carpenter Date: Thu, 14 Nov 2024 17:51:50 +1300 Subject: [PATCH 2/2] Updated version --- .github/project.yml | 4 +-- .../pages/Implementing-Diameter-Service.adoc | 25 +++++-------------- .../ROOT/pages/includes/attributes.adoc | 2 +- .../pages/includes/quarkus-jdiameter.adoc | 7 ++---- .../quarkus-jdiameter_quarkus.diameter.adoc | 7 ++---- 5 files changed, 13 insertions(+), 32 deletions(-) diff --git a/.github/project.yml b/.github/project.yml index 806b1dc78..f62daf68b 100644 --- a/.github/project.yml +++ b/.github/project.yml @@ -1,3 +1,3 @@ release: - current-version: "2.1.1" - next-version: "2.1.2-SNAPSHOT" + current-version: "2.1.2" + next-version: "2.1.3-SNAPSHOT" diff --git a/docs/modules/ROOT/pages/Implementing-Diameter-Service.adoc b/docs/modules/ROOT/pages/Implementing-Diameter-Service.adoc index 7b03c1d99..fead53c3f 100644 --- a/docs/modules/ROOT/pages/Implementing-Diameter-Service.adoc +++ b/docs/modules/ROOT/pages/Implementing-Diameter-Service.adoc @@ -32,7 +32,8 @@ For instance, with Maven, add the following dependency to your POM file: To implement a Diameter service, a class must be defined and annotated with `@DiameterService` and optionally `@DiameterServiceOptions`. -The `@DiameterServiceOption` annotation is used, among other things, to specify the Diameter configuration profile to use for the service. If it is not specified, the service will use the default configuration profile. +The `@DiameterServiceOption` annotation is used, among other things, to specify the Diameter configuration profile to use for the service. +If it is not specified, the service will use the default configuration profile. The type of Diameter service is determined by the xref:_application_session_types[Diameter Application Session Listener] interfaces implemented by the service. @@ -135,23 +136,8 @@ The HA extensions store the session information in a remote cache called `diamet TIP: The cache used can be changed by setting the `quarkus.diameter.parameter.caching-name` property -The Quarkus extension does not automatically include the HA extensions, and to use them, the following maven dependencies need to be added to the application pom file. - -[source,xml] ----- - - io.quarkiverse.diameter - jdiameter-ha-api - ${quarkus.jdiameter.version} - - - io.quarkiverse.diameter - jdiameter-ha-impl - ${quarkus.jdiameter.version} - ----- - -To use the HA components, the configuration needs to be updated as follows: +The Quarkus extension automatically include the HA extensions. +To use the HA components, the following configuration needs to be added: [source,properties] ---- @@ -162,7 +148,8 @@ quarkus.diameter.extensions.timer-facility=org.jdiameter.impl.ha.timer.Replicate <1> This option changes the caching name from the default `diameter` to 'drasessions'. -NOTE: The HA implementation depends on the Quarkus Infinispan client +NOTE: The HA implementation depends on the Quarkus Infinispan client. +You also need to provide the https://quarkus.io/guides/infinispan-client-reference#configuring-the-connection[Infinispan configuration] to make this all work. == Example Configuration diff --git a/docs/modules/ROOT/pages/includes/attributes.adoc b/docs/modules/ROOT/pages/includes/attributes.adoc index 70e354449..e8359c10f 100644 --- a/docs/modules/ROOT/pages/includes/attributes.adoc +++ b/docs/modules/ROOT/pages/includes/attributes.adoc @@ -1,4 +1,4 @@ -:project-version: 2.1.0 +:project-version: 2.1.2 :examples-dir: ./../examples/ :authors: Eddie Carpenter :copyright: Apache2 diff --git a/docs/modules/ROOT/pages/includes/quarkus-jdiameter.adoc b/docs/modules/ROOT/pages/includes/quarkus-jdiameter.adoc index 18c4ec9f2..125ab18a3 100644 --- a/docs/modules/ROOT/pages/includes/quarkus-jdiameter.adoc +++ b/docs/modules/ROOT/pages/includes/quarkus-jdiameter.adoc @@ -1,4 +1,3 @@ -:summaryTableId: quarkus-jdiameter_quarkus-diameter [.configuration-legend] icon:lock[title=Fixed at build time] Configuration property fixed at build time - All other configuration properties are overridable at runtime [.configuration-reference.searchable, cols="80,.^10,.^10"] @@ -223,7 +222,7 @@ endif::add-copy-button-to-env-var[] |`0` -h|[[quarkus-jdiameter_section_quarkus-diameter-local-peer-overload-monitors]] [.section-name.section-level1]##link:#quarkus-jdiameter_section_quarkus-diameter-local-peer-overload-monitors[Optional parent element containing child elements that specify settings relating to the Overload Monitor]## +h|[[quarkus-jdiameter_section_quarkus-diameter-local-peer-overload-monitors]] [.section-name.section-level1]##link:#quarkus-jdiameter_section_quarkus-diameter-local-peer-overload-monitors[Optional parent element containing child elements that specify settings]## h|Type h|Default @@ -1008,7 +1007,7 @@ ifndef::add-copy-button-to-env-var[] Environment variable: `+++QUARKUS_DIAMETER_NETWORK_REALMS__REALMS__LOCAL_ACTION+++` endif::add-copy-button-to-env-var[] -- -a|LocalAction +a|`local`, `relay`, `proxy`, `redirect` |`local` a| [[quarkus-jdiameter_quarkus-diameter-network-realms-realms-dynamic]] [.property-path]##link:#quarkus-jdiameter_quarkus-diameter-network-realms-realms-dynamic[`quarkus.diameter.network.realms."realms".dynamic`]## @@ -1552,5 +1551,3 @@ endif::add-copy-button-to-env-var[] |=== - -:!summaryTableId: \ No newline at end of file diff --git a/docs/modules/ROOT/pages/includes/quarkus-jdiameter_quarkus.diameter.adoc b/docs/modules/ROOT/pages/includes/quarkus-jdiameter_quarkus.diameter.adoc index 18c4ec9f2..125ab18a3 100644 --- a/docs/modules/ROOT/pages/includes/quarkus-jdiameter_quarkus.diameter.adoc +++ b/docs/modules/ROOT/pages/includes/quarkus-jdiameter_quarkus.diameter.adoc @@ -1,4 +1,3 @@ -:summaryTableId: quarkus-jdiameter_quarkus-diameter [.configuration-legend] icon:lock[title=Fixed at build time] Configuration property fixed at build time - All other configuration properties are overridable at runtime [.configuration-reference.searchable, cols="80,.^10,.^10"] @@ -223,7 +222,7 @@ endif::add-copy-button-to-env-var[] |`0` -h|[[quarkus-jdiameter_section_quarkus-diameter-local-peer-overload-monitors]] [.section-name.section-level1]##link:#quarkus-jdiameter_section_quarkus-diameter-local-peer-overload-monitors[Optional parent element containing child elements that specify settings relating to the Overload Monitor]## +h|[[quarkus-jdiameter_section_quarkus-diameter-local-peer-overload-monitors]] [.section-name.section-level1]##link:#quarkus-jdiameter_section_quarkus-diameter-local-peer-overload-monitors[Optional parent element containing child elements that specify settings]## h|Type h|Default @@ -1008,7 +1007,7 @@ ifndef::add-copy-button-to-env-var[] Environment variable: `+++QUARKUS_DIAMETER_NETWORK_REALMS__REALMS__LOCAL_ACTION+++` endif::add-copy-button-to-env-var[] -- -a|LocalAction +a|`local`, `relay`, `proxy`, `redirect` |`local` a| [[quarkus-jdiameter_quarkus-diameter-network-realms-realms-dynamic]] [.property-path]##link:#quarkus-jdiameter_quarkus-diameter-network-realms-realms-dynamic[`quarkus.diameter.network.realms."realms".dynamic`]## @@ -1552,5 +1551,3 @@ endif::add-copy-button-to-env-var[] |=== - -:!summaryTableId: \ No newline at end of file