morganstanley/modern-cpp-kafka

publishing message to multiple brokers?

seanngpack opened this issue · 1 comments

Is there any additional setup to publishing a message to multiple brokers? My setup only publishes to the first broker in the brokers string.

The producer initializes correctly with the list of brokers:
[2023-09-14 09:00:17.341860]NOTICE KafkaProducer[a5b6052c-3e85cf6b] initializes with properties[bootstrap.servers=some_ip:9092,some_ip2:9092|client.id=a5b6052c-3e85cf6b|enable.idempotence=true|log_level=5]

const std::string brokers = "some_ip:9092,some_ip2:9092" // NOLINT
const Topic topic = "some_topic";            // NOLINT

and I send the message just like the producer example:

producer.send(record, deliveryCb, KafkaProducer::SendOption::ToCopyRecordValue);

would appreciate any thoughts or how to debug! thanks

oh, it seems like it's because my brokers are located on different Kafka clusters. will verify later, but im pretty sure this is this issue