Skip to content

Commit

Permalink
Revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusjunges committed May 14, 2024
1 parent 24420ee commit 1d81e14
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/Producers/Producer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
{
Expand All @@ -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;

Expand Down

0 comments on commit 1d81e14

Please sign in to comment.