From f7bab4c6233d9bae0f7f4b94459ffcde70feb216 Mon Sep 17 00:00:00 2001 From: Viraj Salaka Date: Tue, 10 Oct 2023 20:58:05 +0530 Subject: [PATCH] Bug fix: KeyManager discovery client's max inbound message size cannot be increased --- .../connect/enforcer/discovery/KeyManagerDiscoveryClient.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/discovery/KeyManagerDiscoveryClient.java b/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/discovery/KeyManagerDiscoveryClient.java index 57981275d2..a84b19e1e1 100644 --- a/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/discovery/KeyManagerDiscoveryClient.java +++ b/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/discovery/KeyManagerDiscoveryClient.java @@ -122,7 +122,8 @@ public void run() { public void watchKeyManagers() { // TODO: implement a deadline with retries - reqObserver = stub.streamKeyManagers(new StreamObserver<>() { + int maxSize = Integer.parseInt(ConfigHolder.getInstance().getEnvVarConfig().getXdsMaxMsgSize()); + reqObserver = stub.withMaxInboundMessageSize(maxSize).streamKeyManagers(new StreamObserver<>() { @Override public void onNext(DiscoveryResponse response) { logger.info("Key manager event received with version : " + response.getVersionInfo());