You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a producer on a Linux Ubuntu machine to produce messages for a Kafka broker on another machine, however, when I run the program the error I see is as if the producer is trying to connect to the localhost and not the remote machine.
How to reproduce
package main
import (
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)
funcmain() {
// (1) Configuração e Criação do Produtorconfig:=&kafka.ConfigMap{"bootstrap.servers": "10.200.57.34"}
producer, err:=kafka.NewProducer(config)
iferr!=nil {
panic(err)
}
deferproducer.Close()
// (1) FIM// (2) Produção da Mensagemtopic:="test"msg:=&kafka.Message{
Value: []byte("hi"),
Key: []byte("1"),
TopicPartition: kafka.TopicPartition{Topic: &topic, Partition: kafka.PartitionAny},
}
wait:=make(chan kafka.Event)
err=producer.Produce(msg, wait)
iferr!=nil {
panic(err)
}
// (2) FIM<-wait
}
Lib C:
librdkafka-dev is already the newest version (2.3.0-1build2).
My error:
%3|1731507765.895|FAIL|rdkafka#producer-1| [thrd:localhost:9092/1]: localhost:9092/1: Connect to ipv4#127.0.0.1:9092 failed: Connection refused (after 0ms in state CONNECT)
%3|1731507766.094|FAIL|rdkafka#producer-1| [thrd:localhost:9092/1]: localhost:9092/1: Connect to ipv4#127.0.0.1:9092 failed: Connection refused (after 0ms in state CONNECT, 1 identical error(s) suppressed)
Tks
The text was updated successfully, but these errors were encountered:
Description
Hello,
I'm trying to create a producer on a Linux Ubuntu machine to produce messages for a Kafka broker on another machine, however, when I run the program the error I see is as if the producer is trying to connect to the localhost and not the remote machine.
How to reproduce
Lib C:
librdkafka-dev is already the newest version (2.3.0-1build2).
My error:
Tks
The text was updated successfully, but these errors were encountered: