Skip to content

Commit 3afe0f5

Browse files
fixing-changes
1 parent 2b1f6e3 commit 3afe0f5

File tree

3 files changed

+17
-25
lines changed

3 files changed

+17
-25
lines changed

.env.example

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1-
KAFKA_BOOTSTRAP_SERVERS=<kafka-bootstrap-servers>
2-
KAFKA_TOPIC_NAME=<kafka-topic-name>
3-
KAFKA_GROUP_ID=<kafka-group-id>
1+
CACHE_DRIVER=file
2+
3+
QUEUE_CONNECTION=kafka
4+
KAFKA_TOPIC_NAME=categories-topic
5+
KAFKA_GROUP_ID=categories-group
6+
KAFKA_QUEUE=default
7+
KAFKA_CONSUMER_GROUP_ID=categories-group
8+
KAFKA_BROKERS=localhost:9092
9+
KAFKA_ERROR_SLEEP=5
10+
KAFKA_DEADLOCK_SLEEP=2
11+
KAFKA_SASL_ENABLE=false
12+
KAFKA_SSL_CA_LOCATION=
13+
KAFKA_SASL_PLAIN_USERNAME=
14+
KAFKA_SASL_PLAIN_PASSWORD=

src/Services/KafkaConnector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ public function connect(array $config): KafkaQueue
2424
protected function createProducer(array $config): KafkaProducerInterface
2525
{
2626
return KafkaProducerBuilder::create()
27-
->withAdditionalBroker($config['bootstrap-servers'])
27+
->withAdditionalBroker($config['brokers'])
2828
->build();
2929
}
3030

3131
protected function createConsumer(array $config): KafkaConsumerInterface
3232
{
3333
return KafkaConsumerBuilder::create()
34-
->withAdditionalBroker($config['bootstrap-servers'])
35-
->withConsumerGroup($config['group-id'])
34+
->withAdditionalBroker($config['brokers'])
35+
->withConsumerGroup($config['consumer_group_id'])
3636
->withAdditionalSubscription($config['topic-name'])
3737
->build();
3838
}

src/Services/KafkaQueue.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -124,23 +124,4 @@ public function bulk($jobs, $data = '', $queue = null)
124124
public function pop($queue = null)
125125
{
126126
}
127-
128-
/**
129-
* Get the connection name for the queue.
130-
*
131-
* @return string
132-
*/
133-
public function getConnectionName()
134-
{
135-
}
136-
137-
/**
138-
* Set the connection name for the queue.
139-
*
140-
* @param string $name
141-
* @return $this
142-
*/
143-
public function setConnectionName($name)
144-
{
145-
}
146127
}

0 commit comments

Comments
 (0)