diff --git a/server-common/src/main/java/org/a2aproject/sdk/server/tasks/BasePushNotificationSender.java b/server-common/src/main/java/org/a2aproject/sdk/server/tasks/BasePushNotificationSender.java index b0f6e38d8..a41df2dea 100644 --- a/server-common/src/main/java/org/a2aproject/sdk/server/tasks/BasePushNotificationSender.java +++ b/server-common/src/main/java/org/a2aproject/sdk/server/tasks/BasePushNotificationSender.java @@ -66,8 +66,13 @@ public BasePushNotificationSender(PushNotificationConfigStore configStore) { @Inject public BasePushNotificationSender(PushNotificationConfigStore configStore, - Instance formatters) { - this.httpClient = A2AHttpClientFactory.create(); + Instance formatters, + Instance httpClientInstance) { + if (!httpClientInstance.isUnsatisfied()) { + this.httpClient = httpClientInstance.get(); + } else { + this.httpClient = A2AHttpClientFactory.create(); + } this.configStore = configStore; this.formattersByVersion = new HashMap<>(); for (PushNotificationPayloadFormatter f : formatters) {