This commit is contained in:
as2252258@163.com
2021-04-11 18:34:48 +08:00
parent 2aa54fb037
commit 42ce1015c2
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -32,6 +32,7 @@ use Snowflake\Snowflake;
*/
public function execute(array $handler): mixed
{
var_dump($handler);
if (!($handler[0] instanceof ConsumerInterface)) {
return false;
}
+1 -1
View File
@@ -106,7 +106,7 @@ class Kafka extends \Snowflake\Process\Process
$message = swoole_serialize(['action' => 'kafka', 'body' => [$topic, $message]]);
$server->sendMessage($message, random_int(0, $setting));
$server->sendMessage($message, random_int(0, $setting - 1));
} catch (Throwable $exception) {
logger()->addError($exception, 'throwable');
}