Skip to content

关于接入阿里云的Kafka,提示:Kafka send timeout. #10

@Akuns

Description

@Akuns

问题:

1. 当给一个不存在的Topic投递时,会卡死并且返回Kafka send timeout.,Topic在阿里云kafka消息队列控制台提前创建好就没问题!

2. hyperf框架启动30-50秒左右才会进行消费!

环境:

Hyperf:2.2.14
Swoole:4.8.5

代码如下:

try {
        $producer->send('test111', '投递成功,但是这一步超时了!', 'key');
    } catch (\Exception $exception) {
        return output_error($exception->getMessage());
    }

image

kafka.php配置如下:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions