From e7f48d1094b40c9881b008c7bc0d102f15cfae75 Mon Sep 17 00:00:00 2001 From: "Roland Franssen :)" Date: Wed, 20 Mar 2024 12:51:14 +0100 Subject: [PATCH 1/2] Update Configuration.php --- src/Stream/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Stream/Configuration.php b/src/Stream/Configuration.php index 6d87c27..b1f3ccc 100644 --- a/src/Stream/Configuration.php +++ b/src/Stream/Configuration.php @@ -207,7 +207,7 @@ public function toArray(): array 'max_msg_size' => $this->getMaxMessageSize(), 'max_msgs_per_subject' => $this->getMaxMessagesPerSubject(), 'name' => $this->getName(), - 'replicas' => $this->getReplicas(), + 'num_replicas' => $this->getReplicas(), 'retention' => $this->getRetentionPolicy(), 'storage' => $this->getStorageBackend(), 'subjects' => $this->getSubjects(), From b917a601c0c2d6dc84bc4f197ff9835cff4b594e Mon Sep 17 00:00:00 2001 From: "Roland Franssen :)" Date: Wed, 20 Mar 2024 12:57:34 +0100 Subject: [PATCH 2/2] Update Configuration.php --- src/Stream/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Stream/Configuration.php b/src/Stream/Configuration.php index b1f3ccc..5179e11 100644 --- a/src/Stream/Configuration.php +++ b/src/Stream/Configuration.php @@ -34,7 +34,7 @@ public function fromArray(array $array): self return $this ->setDiscardPolicy($array['discard']) ->setMaxConsumers($array['max_consumers']) - ->setReplicas($array['replicas']) + ->setReplicas($array['replicas'] ?? $array['num_replicas']) ->setRetentionPolicy($array['retention']) ->setStorageBackend($array['storage']) ->setSubjects($array['subjects']);