Skip to content

Commit 7406116

Browse files
authored
Merge pull request #23 from ensi-platform/ecs-2131
ECS-2131
2 parents 61f6525 + aaba68e commit 7406116

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"license": "MIT",
66
"require": {
77
"php": "^8.1",
8+
"ext-pcntl": "*",
89
"ext-rdkafka": "*",
910
"ensi/laravel-phprdkafka": "^0.4.0",
1011
"laravel/framework": "^10.0 || ^11.0"

config/kafka-consumer.php

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
<?php
22

33
return [
4-
'global_middleware' => [],
4+
'global_middleware' => [],
5+
'stop_signals' => [SIGTERM, SIGINT, SIGQUIT],
56

6-
'processors' => [],
7+
'processors' => [],
78

8-
'log_channel' => env('KAFKA_CONSUMER_LOG_CHANNEL', 'null'),
9+
'log_channel' => env('KAFKA_CONSUMER_LOG_CHANNEL', 'null'),
910

10-
'consumer_options' => [
11-
/** options for consumer with name `default` */
12-
'default' => [
13-
/*
14-
| Optional, defaults to 20000.
15-
| Kafka consume timeout in milliseconds.
16-
*/
17-
'consume_timeout' => 20000,
11+
'consumer_options' => [
12+
/** options for consumer with name `default` */
13+
'default' => [
14+
/*
15+
| Optional, defaults to 20000.
16+
| Kafka consume timeout in milliseconds.
17+
*/
18+
'consume_timeout' => 20000,
1819

19-
/*
20-
| Optional, defaults to empty array.
21-
| Array of middleware.
22-
*/
23-
'middleware' => [],
24-
],
25-
],
20+
/*
21+
| Optional, defaults to empty array.
22+
| Array of middleware.
23+
*/
24+
'middleware' => [],
25+
],
26+
],
2627
];

src/Commands/KafkaConsumeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function handleSignal(int $signal, int|false $previousExitCode = 0): int|
7474
$this->consumer->forceStop();
7575
}
7676

77-
return $previousExitCode;
77+
return false;
7878
}
7979

8080
/**

0 commit comments

Comments
 (0)