Skip to content

Error when i run "export KAFKA_CONSUMER_GROUP_ID="group2" && php artisan queue:work --sleep=3 --tries=3" #24

@shreyasmsglob

Description

@shreyasmsglob

In kafka.php I have specified the broker

'brokers' => env('KAFKA_BROKERS', '172.105.23.57:9092').

This is to connect ::(KafkaConnector.php)

    $producer = $this->container->makeWith('queue.kafka.producer', []);
    $producer->addBrokers('172.105.23.57:9092');

    $topicConf = $this->container->makeWith('queue.kafka.topic_conf', []);
    $topicConf->set('auto.offset.reset', 'largest');

    $conf = $this->container->makeWith('queue.kafka.conf', []);
    $conf->set('group.id', array_get($config, 'consumer_group_id', 'php-pubsub'));
    $conf->set('metadata.broker.list', '172.105.23.57:9092');
  
    $consumer = $this->container->makeWith('queue.kafka.consumer', ['conf' => $conf]);

    return new KafkaQueue(
        $producer,
        $consumer,
        $config
    );

Error::

%3|1574254453.078|FAIL|rdkafka#producer-1| [thrd:172.105.23.57:9092/bootstrap]: 172.105.23.57:9092/bootstrap: Connect to ipv4#172.105.23.57:9092 failed: Connect ion refused (after 1028ms in state CONNECT)
%3|1574254453.078|ERROR|rdkafka#producer-1| [thrd:172.105.23.57:9092/bootstrap]: 172.105.23.57:9092/bootstrap: Connect to ipv4#172.105.23.57:9092 failed: Connec tion refused (after 1028ms in state CONNECT)
%3|1574254453.078|ERROR|rdkafka#producer-1| [thrd:172.105.23.57:9092/bootstrap]: 1/1 brokers are down

And I have already changed advertisers.listeners in server.properties.

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