diff --git a/src/Consumer/Consumer.php b/src/Consumer/Consumer.php index 5f0cb9f..794932f 100644 --- a/src/Consumer/Consumer.php +++ b/src/Consumer/Consumer.php @@ -41,6 +41,11 @@ public function create($ifNotExists = true): self return $this; } + public function update(): self + { + return $this->create(false); + } + public function delete(): self { $this->client->api('CONSUMER.DELETE.' . $this->getStream() . '.' . $this->getName()); @@ -195,6 +200,6 @@ public function setIterations(int $iterations): self private function shouldCreateConsumer(bool $ifNotExists): bool { return ($this->configuration->isEphemeral() && $this->configuration->getName() === null) - || !$this->exists(); + || !$this->exists() || !$ifNotExists; } }