From 909ccda44d8ed3536b76eeac51e8ff542b185672 Mon Sep 17 00:00:00 2001 From: HeshanSudarshana Date: Tue, 9 Apr 2024 16:13:23 +0530 Subject: [PATCH] Add event hub configurations to the config catalog --- en/docs/reference/config-catalog.md | 497 +++++++++++++----- .../apim.event_hub.publish.url_group.toml | 7 + .../data/apim.event_hub.toml | 7 + .../data/configs.json | 98 ++++ 4 files changed, 490 insertions(+), 119 deletions(-) create mode 100644 en/tools/config-catalog-generator/data/apim.event_hub.publish.url_group.toml create mode 100644 en/tools/config-catalog-generator/data/apim.event_hub.toml diff --git a/en/docs/reference/config-catalog.md b/en/docs/reference/config-catalog.md index 4bbbedb89a..4f0d40ad2d 100644 --- a/en/docs/reference/config-catalog.md +++ b/en/docs/reference/config-catalog.md @@ -5073,7 +5073,7 @@ If a token is revoked, the notification will be sent to the JMS topic. Write a c -## Enable Notifications +## API-M Event Hub configurations
@@ -5085,6 +5085,265 @@ If a token is revoked, the notification will be sent to the JMS topic. Write a c
+
[apim.event_hub]
+enabled = true
+username = "username"
+password = "password"
+service_url = "https://control-plane-host/services/"
+event_listening_endpoints = ["tcp://control-plane-host:5672"]
+event_duplicate_url = ["tcp://control-plane-2-host:5672"]
+
+
+
+
+
+
+ [apim.event_hub] + +

+ Configures the event hub in API Manager +

+
+
+
+
+ enable +
+
+
+

+ boolean + +

+
+ Default: true +
+
+ Possible Values: true,false +
+
+
+

Enable the event hub.

+
+
+
+
+ username +
+
+
+

+ string + +

+
+ Default: Username of the super tenant admin +
+ +
+
+

Username of the super tenant admin.

+
+
+
+
+ password +
+
+
+

+ string + +

+
+ Default: Password of the super tenant admin +
+ +
+
+

Password of the super tenant admin.

+
+
+
+
+ service_url +
+
+
+

+ string + +

+
+ Default: +
+ +
+
+

Internal service URL of the event hub. This configuration is used to pull artifacts from the control plane.

+
+
+
+
+ event_listening_endpoints +
+
+
+

+ string array + +

+
+ Default: +
+ +
+
+

Array of event listening endpoints which are used to create a JMS connection with the control plane.

+
+
+
+
+ event_duplicate_url +
+
+
+

+ string array + +

+
+ Default: +
+ +
+
+

Array of endpoints which is used in control plane to communicate with the other in a HA setup (If multiple URLs are added, other URLs will be taken as failover endpoints).

+
+
+
+
+ event_waiting_time +
+
+
+

+ integer + +

+
+ Default: +
+ +
+
+

The waiting time before the gateway/traffic manager waits before processing JMS events received from the event hub (in Milliseconds).

+
+
+
+
+
+
+
+ + + + + + +## API-M Event Hub Publish URL group configurations + + +
+
+
+
+ + + +
+
+
[[apim.event_hub.publish.url_group]]
+urls = ["tcp://control-plane-1-host:9611"]
+auth_urls = ["ssl://control-plane-1-host:9711"]
+
+[[apim.event_hub.publish.url_group]]
+urls = ["tcp://control-plane-2-host:9611"]
+auth_urls = ["ssl://control-plane-2-host:9711"]
+
+
+
+
+
+
+ [apim.event_hub.publish.url_group] + +

+ Configures event hub publish URL groups +

+
+
+
+
+ urls +
+
+
+

+ string array + Required +

+
+ Default: +
+ +
+
+

Array of URLs used to publish event streams to the control plane in a HA setup (If multiple URLs are added, other URLs will be taken as failover endpoints).

+
+
+
+
+ auth_urls +
+
+
+

+ string array + Required +

+
+ Default: +
+ +
+
+

Array of URLs used to create a secure connection for binary data streaming to the control plane in a HA setup (If multiple URLs are added, other URLs will be taken as failover endpoints).

+
+
+
+
+
+
+
+
+
+
+ + + +## Enable Notifications + + +
+
+
+
+ + + +
+
[apim.notification]
 from_address = "abcd@gmail.com"
 username = "abcd@gmail.com"
@@ -5276,8 +5535,8 @@ enable_authentication = true
- - + +
[tenant_mgt]
@@ -5332,8 +5591,8 @@ enable_email_domain = true
- - + +
[output_adapter.email]
@@ -5528,8 +5787,8 @@ enable_authentication = true
- - + +
[multi_tenancy.stratos]
@@ -5782,8 +6041,8 @@ sso_loading_message = "Loading..."
- - + +
[multi_tenancy.stratos.paypal]
@@ -5916,8 +6175,8 @@ environment = "live"
- - + +
[multi_tenancy.stratos.manager_service]
@@ -6010,8 +6269,8 @@ admin_password = "admin"
- - + +
[multi_tenancy.usage_agent.data_persistence_task]
@@ -6106,8 +6365,8 @@ execution_interval_in_ms = "-1"
- - + +
[multi_tenancy.throttling_manager_tasks]
@@ -6163,8 +6422,8 @@ data_providers = [
         
- - + +
[multi_tenancy.throttling_manager_tasks.parameters]
@@ -6239,8 +6498,8 @@ delay = "60"
- - + +
[multi_tenancy.cloud_services]
@@ -6395,8 +6654,8 @@ description = "API Manager in the cloud"
- - + +
[multi_tenancy.billing.package.demo]
@@ -6469,8 +6728,8 @@ subscription_charge = 0
- - + +
[multi_tenancy.billing.package.demo.users]
@@ -6543,8 +6802,8 @@ charge= "0"
- - + +
[multi_tenancy.billing.package.demo.resource_volume]
@@ -6617,8 +6876,8 @@ overuse_charge= "0"
- - + +
[multi_tenancy.billing.package.demo.bandwidth]
@@ -6691,8 +6950,8 @@ overuse_charge= "0"
- - + +
[multi_tenancy.billing.package.smb]
@@ -6765,8 +7024,8 @@ subscription_charge = "100"
- - + +
[multi_tenancy.billing.package.smb.users]
@@ -6839,8 +7098,8 @@ charge= "0"
- - + +
[multi_tenancy.billing.package.smb.resource_volume]
@@ -6913,8 +7172,8 @@ overuse_charge= "0"
- - + +
[multi_tenancy.billing.package.smb.bandwidth]
@@ -6987,8 +7246,8 @@ overuse_charge= "0"
- - + +
[multi_tenancy.billing.package.custom]
@@ -7061,8 +7320,8 @@ subscription_charge = "500"
- - + +
[multi_tenancy.billing.package.custom.users]
@@ -7135,8 +7394,8 @@ charge= "0"
- - + +
[multi_tenancy.billing.package.custom.resource_volume]
@@ -7209,8 +7468,8 @@ overuse_charge = "0.03"
- - + +
[multi_tenancy.billing.package.custom.bandwidth]
@@ -7285,8 +7544,8 @@ overuse_charge= "0"
- - + +
[indexing]
@@ -7443,8 +7702,8 @@ re_indexing = 1
- - + +
[transport.http.properties]
@@ -7853,8 +8112,8 @@ URIEncoding = "UTF-8"
- - + +
[transport.https.properties]
@@ -8351,8 +8610,8 @@ SSLEnabled = "true"
- - + +
[transport.passthru_https]
@@ -9080,8 +9339,8 @@ sender.ssl_profile.interval = "600000"
- - + +
[transport.passthru_https]
@@ -9538,8 +9797,8 @@ sender.parameters.SO_TIMEOUT = 60000
- - + +
#You can use one of the two options listed below for the configuration
@@ -9717,8 +9976,8 @@ bypass_hosts = ["localhost"]
- - + +
#You can use one of the two options listed below for the configuration
@@ -9897,8 +10156,8 @@ bypass_hosts = ["localhost"]
         
- - + +
[transport.ws]
@@ -10021,8 +10280,8 @@ sender.parameter.customParameter = ""
- - + +
[transport.wss]
@@ -10189,8 +10448,8 @@ sender.trust_store.password = "$ref{truststore.password}"
- - + +
[message_builders]
@@ -10423,8 +10682,8 @@ application_binary = "org.apache.axis2.format.BinaryBuilder"
- - + +
[blocking.message_builders]
@@ -10468,8 +10727,8 @@ application_binary = "org.apache.axis2.format.BinaryBuilder"
- - + +
[message_formatters]
@@ -10746,8 +11005,8 @@ application_binary =  "org.apache.axis2.format.BinaryFormatter"
- - + +
[blocking.message_formatters]
@@ -10793,8 +11052,8 @@ application_binary =  "org.apache.axis2.format.BinaryFormatter"
- - + +
[[custom_message_builders]]
@@ -10873,8 +11132,8 @@ class = "org.apache.axis2.json.JSONBadgerfishOMBuilder"
- - + +
[[blocking.custom_message_builders]]
@@ -10911,8 +11170,8 @@ class = "org.apache.axis2.json.JSONBadgerfishOMBuilder"
- - + +
[[custom_message_formatters]]
@@ -10991,8 +11250,8 @@ class = "org.apache.axis2.json.JSONBadgerfishMessageFormatter"
- - + +
[[blocking.custom_message_formatters]]
@@ -11029,8 +11288,8 @@ class = "org.apache.axis2.json.JSONBadgerfishMessageFormatter"
- - + +
[mediation]
@@ -11367,8 +11626,8 @@ inbound.max_threads = 100
- - + +
enabled_global_handlers= ["custom_logger"]
@@ -11449,8 +11708,8 @@ custom_logger.class= "com.wso2.apim.log.handler.SynapseLogHandler"
         
- - + +
[governance]
@@ -11507,8 +11766,8 @@ life_cycle_checklist_items_enabled = true
- - + +
[qpid.heartbeat]
@@ -11583,8 +11842,8 @@ timeout_factor = 3.0
- - + +
[carbon_health_check]
@@ -11639,8 +11898,8 @@ enable = true
- - + +
[carbon_health_check.health_checker.super_tenant_health_checker]
@@ -11715,8 +11974,8 @@ order = "98"
- - + +
[carbon_health_check.health_checker.super_tenant_health_checker.properties]
@@ -11769,8 +12028,8 @@ monitored.user.stores = "primary,sec"
- - + +
[carbon_health_check.health_checker.data_source_health_checker]
@@ -11845,8 +12104,8 @@ order = "97"
- - + +
[carbon_health_check.health_checker.data_source_health_checker.properties]
@@ -11919,8 +12178,8 @@ monitored.datasources = "jdbc/WSO2AM_DB,jdbc/SHARED_DB,jdbc/WSO2CarbonDB"
         
- - + +
[health_checker]
@@ -12016,8 +12275,8 @@ first_property = "value"
- - + +
[oauth]
@@ -12195,8 +12454,8 @@ token_context_dialect_uri = "http://wso2.org/claims"
         
- - + +
[oauth.token_validation]
@@ -12290,8 +12549,8 @@ refresh_token_validity = "86400"
         
- - + +
[oauth.token_cleanup]
@@ -12368,8 +12627,8 @@ retain_access_tokens_for_auditing = true
- - + +
[oauth.oidc.extensions]
@@ -12597,8 +12856,8 @@ enable_unmapped_user_attributes = true
         
- - + +
[oauth.grant_type.authorization_code]
@@ -13086,8 +13345,8 @@ grant_validator = "org.wso2.carbon.identity.oauth2.grant.kerberos.KerberosGrantV
         
- - + +
[session_data.persistence]
@@ -13140,8 +13399,8 @@ persistence_pool_size = 0
- - + +
[oauth.token_generation]
@@ -13196,8 +13455,8 @@ retry_count_on_persistence_failures = 5
- - + +
[user_store.properties]
@@ -14025,8 +14284,8 @@ UserCoreCacheTimeOut = 5 
- - + +
[custom_keystore.APIKeyKeyStore]
@@ -14161,8 +14420,8 @@ key_password = "wso2carbon"
- - + +
[http_access_log]
@@ -14219,8 +14478,8 @@ useLogger = true
- - + +
#### Sample deployment.toml entry
diff --git a/en/tools/config-catalog-generator/data/apim.event_hub.publish.url_group.toml b/en/tools/config-catalog-generator/data/apim.event_hub.publish.url_group.toml
new file mode 100644
index 0000000000..5f37bc0763
--- /dev/null
+++ b/en/tools/config-catalog-generator/data/apim.event_hub.publish.url_group.toml
@@ -0,0 +1,7 @@
+[[apim.event_hub.publish.url_group]]
+urls = ["tcp://control-plane-1-host:9611"]
+auth_urls = ["ssl://control-plane-1-host:9711"]
+
+[[apim.event_hub.publish.url_group]]
+urls = ["tcp://control-plane-2-host:9611"]
+auth_urls = ["ssl://control-plane-2-host:9711"]
diff --git a/en/tools/config-catalog-generator/data/apim.event_hub.toml b/en/tools/config-catalog-generator/data/apim.event_hub.toml
new file mode 100644
index 0000000000..d010ed52a3
--- /dev/null
+++ b/en/tools/config-catalog-generator/data/apim.event_hub.toml
@@ -0,0 +1,7 @@
+[apim.event_hub]
+enabled = true
+username = "username"
+password = "password"
+service_url = "https://control-plane-host/services/"
+event_listening_endpoints = ["tcp://control-plane-host:5672"]
+event_duplicate_url = ["tcp://control-plane-2-host:5672"]
diff --git a/en/tools/config-catalog-generator/data/configs.json b/en/tools/config-catalog-generator/data/configs.json
index 9ffb4ade5a..e295ea1b6b 100755
--- a/en/tools/config-catalog-generator/data/configs.json
+++ b/en/tools/config-catalog-generator/data/configs.json
@@ -1914,6 +1914,104 @@
             ],
             "exampleFile": "apim.token.revocation.toml"
         },
+        {
+            "title": "API-M Event Hub configurations",
+            "options": [
+                {
+                    "name": "apim.event_hub",
+                    "required": false,
+                    "description": "Configures the event hub in API Manager",
+                    "params": [
+                        {
+                            "name": "enable",
+                            "type": "boolean",
+                            "required": false,
+                            "default": "true",
+                            "possible": "true,false",
+                            "description": "Enable the event hub."
+                        },
+                        {
+                            "name": "username",
+                            "type": "string",
+                            "required": false,
+                            "default": "Username of the super tenant admin",
+                            "possible": "",
+                            "description": "Username of the super tenant admin."
+                        },
+                        {
+                            "name": "password",
+                            "type": "string",
+                            "required": false,
+                            "default": "Password of the super tenant admin",
+                            "possible": "",
+                            "description": "Password of the super tenant admin."
+                        },
+                        {
+                            "name": "service_url",
+                            "type": "string",
+                            "required": false,
+                            "default": "",
+                            "possible": "",
+                            "description": "Internal service URL of the event hub. This configuration is used to pull artifacts from the control plane."
+                        },
+                        {
+                            "name": "event_listening_endpoints",
+                            "type": "string array",
+                            "required": false,
+                            "default": "",
+                            "possible": "",
+                            "description": "Array of event listening endpoints which are used to create a JMS connection with the control plane."
+                        },
+                        {
+                            "name": "event_duplicate_url",
+                            "type": "string array",
+                            "required": false,
+                            "default": "",
+                            "possible": "",
+                            "description": "Array of endpoints which is used in control plane to communicate with the other in a HA setup (If multiple URLs are added, other URLs will be taken as failover endpoints)."
+                        },
+                        {
+                            "name": "event_waiting_time",
+                            "type": "integer",
+                            "required": false,
+                            "default": "",
+                            "possible": "",
+                            "description": "The waiting time before the gateway/traffic manager waits before processing JMS events received from the event hub (in Milliseconds)."
+                        }
+                    ]
+                }
+            ],
+            "exampleFile": "apim.event_hub.toml"
+        },
+        {
+            "title": "API-M Event Hub Publish URL group configurations",
+            "options": [
+                {
+                    "name": "apim.event_hub.publish.url_group",
+                    "required": false,
+                    "description": "Configures event hub publish URL groups",
+                    "params": [
+                        {
+                            "name": "urls",
+                            "type": "string array",
+                            "required": true,
+                            "default": "",
+                            "possible": "",
+                            "description": "Array of URLs used to publish event streams to the control plane in a HA setup (If multiple URLs are added, other URLs will be taken as failover endpoints)."
+                        },
+                        {
+                            "name": "auth_urls",
+                            "type": "string array",
+                            "required": true,
+                            "default": "",
+                            "possible": "",
+                            "description": "Array of URLs used to create a secure connection for binary data streaming to the control plane in a HA setup (If multiple URLs are added, other URLs will be taken as failover endpoints)."
+                        }
+                    ]
+                }
+            ],
+            "exampleFile": "apim.event_hub.publish.url_group.toml"
+        },
         {
             "title": "Enable Notifications",
             "options": [