Skip to content

Commit f30a279

Browse files
authored
Merge pull request #5 from Sin30/config-adjustment
Adjust default value for config auto.offset.reset #5 by Sin30
2 parents 1328321 + 747d74e commit f30a279

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Queue/Connectors/KafkaConnector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Illuminate\Queue\Connectors\ConnectorInterface;
77
use Rapide\LaravelQueueKafka\Queue\KafkaQueue;
88
use RdKafka\Conf;
9-
use RdKafka\Consumer;
9+
use RdKafka\KafkaConsumer;
1010
use RdKafka\Producer;
1111
use RdKafka\TopicConf;
1212

@@ -42,7 +42,7 @@ public function connect(array $config)
4242

4343
/** @var TopicConf $topicConf */
4444
$topicConf = $this->container->makeWith('queue.kafka.topic_conf', []);
45-
$topicConf->set('auto.offset.reset', 'smallest');
45+
$topicConf->set('auto.offset.reset', 'largest');
4646

4747
/** @var Conf $conf */
4848
$conf = $this->container->makeWith('queue.kafka.conf', []);
@@ -52,7 +52,7 @@ public function connect(array $config)
5252
$conf->set('offset.store.method', 'broker');
5353
$conf->setDefaultTopicConf($topicConf);
5454

55-
/** @var Consumer $consumer */
55+
/** @var KafkaConsumer $consumer */
5656
$consumer = $this->container->makeWith('queue.kafka.consumer', ['conf' => $conf]);
5757

5858
return new KafkaQueue(

0 commit comments

Comments
 (0)