Skip to content

Commit 2b1f6e3

Browse files
init
1 parent 03bb4af commit 2b1f6e3

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"php": "^8.2",
1818
"laravel/lumen-framework": "^10.0",
1919
"squizlabs/php_codesniffer": "^3.7",
20-
"jobcloud/php-kafka-lib": "^2.0"
20+
"jobcloud/php-kafka-lib": "^1.0"
2121
},
2222
"scripts": {
2323
"php-fixer": [

composer.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Services/KafkaQueue.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
declare(strict_types=1);
44

55
namespace Kafka\Services;
6+
67
use Kafka\Jobs\Job;
78
use Illuminate\Queue\Queue;
89
use Jobcloud\Kafka\Producer\KafkaProducer;
@@ -33,7 +34,8 @@ public function __construct($producer, $consumer)
3334
*/
3435
public function push($job, $data = '', $queue = null)
3536
{
36-
$message = KafkaProducerMessage::create(config('queue.connections.kafka.topic-name'), 0)->withBody(serialize($job));
37+
$message = KafkaProducerMessage::create(config('queue.connections.kafka.topic-name'), 0)
38+
->withBody(serialize($job));
3739

3840
$this->producer->produce($message);
3941

0 commit comments

Comments
 (0)