hi, I would like to know if its possible to send messages from my Dataminer Kafka Producer to a broker that works in HA. This mean that the broker exposses 3 different ports, sharing same IP. When one of the brokers is down I shhould detect it from DAtaminer and send the messages to the active broker.
I have read the documentation and I see that is possible to send to diffferent partititios of the same topic and also to different topics of the same broker but is it possible to send to different ports in a broker?
thanks
Hi Jesus
Yes, it is possible. Kafka supports multiple brokers (including multiple ports on the same IP) via the bootstrap.servers configuration. This allows the client to automatically fail over if any particular broker or port becomes unavailable.
The Broker parameter of the connector (bootstrap.servers property in the Kafka library) accepts a comma-separated list of broker addresses, each in the format host:port.
For example:
If you have multiple brokers running on the same IP but different ports, simply list all ports (making sure you specify the hostname each time). The Kafka client (DataMiner) treats each host:port combination as a separate endpoint.
Regards