first commit
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace KupShop\KafkaBundle\Connection;
|
||||
|
||||
use KupShop\KafkaBundle\Util\KafkaUtilTrait;
|
||||
|
||||
class KafkaConnectionConfig
|
||||
{
|
||||
use KafkaUtilTrait;
|
||||
|
||||
public function __construct(
|
||||
private string $groupId,
|
||||
private string $topic = 'default',
|
||||
private array $config = [],
|
||||
) {
|
||||
}
|
||||
|
||||
public function getGroupId(): string
|
||||
{
|
||||
return $this->groupId;
|
||||
}
|
||||
|
||||
public function getTopic(): string
|
||||
{
|
||||
return $this->getShopTopicName($this->topic);
|
||||
}
|
||||
|
||||
public function getTopics(): array
|
||||
{
|
||||
return [$this->getTopic()];
|
||||
}
|
||||
|
||||
public function getConfig(): array
|
||||
{
|
||||
return $this->config;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user