From 1d81e14427a55b1047c6e2c70ae4d58db04051d2 Mon Sep 17 00:00:00 2001 From: Mateus Junges Date: Tue, 14 May 2024 16:56:49 -0300 Subject: [PATCH] Revert changes --- src/Producers/Producer.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Producers/Producer.php b/src/Producers/Producer.php index d1414fc..fd3ae11 100644 --- a/src/Producers/Producer.php +++ b/src/Producers/Producer.php @@ -30,8 +30,6 @@ class Producer implements ProducerContract private readonly KafkaProducer $producer; private readonly Dispatcher $dispatcher; - private string $topic; - public bool $transactionInitialized = false; public function __construct( @@ -44,13 +42,6 @@ public function __construct( $this->dispatcher = App::make(Dispatcher::class); } - public function setTopic(string $topic): self - { - $this->topic = $topic; - - return $this; - } - /** Set the Kafka Configuration. */ private function setConf(array $options): Conf { @@ -72,7 +63,7 @@ public function produce(ProducerMessage $message, bool $shouldFlush = false): bo { $this->dispatcher->dispatch(new PublishingMessage($message)); - $topic = $this->producer->newTopic($message->getTopicName() ?? $this->topic); + $topic = $this->producer->newTopic($message->getTopicName()); $message = clone $message;