And*_*hoi 2 apache-kafka kafka-consumer-api kafka-producer-api spring-kafka
在kafka-client 2.1.0中,client.dns.lookup可用。以下是每个选项的说明。
use_all_dns_ips
当查找返回主机名的多个 IP 地址时,在连接失败之前将尝试连接所有这些 IP 地址
仅限resolve_canonical_bootstrap_servers_only
每个条目都将被解析并扩展为规范名称列表
他们不是都使用dns吗?use_all_dns_ips和resolve_canonical_bootstrap_servers_only之间有什么区别?
虽然这两个选项都与 DNS 有关,但它们是不同的:
use_all_dns_ips: When resolving broker hostnames, if multiple IPs are returned for a name, the client will store them all and cycle through all IPs if it gets disconnected.
More details in the KIP: https://cwiki.apache.org/confluence/display/KAFKA/KIP-302+-+Enable+Kafka+clients+to+use+all+DNS+resolved+IP+addresses
resolve_canonical_bootstrap_servers_only: When enabled, once a hostname has been resolved, the client is do a reverse lookup to find the FQDN. This can be required in some cases when using SASL GSSAPI.
More details in the KIP: https://cwiki.apache.org/confluence/display/KAFKA/KIP-235%3A+Add+DNS+alias+support+for+secured+connection
| 归档时间: |
|
| 查看次数: |
4911 次 |
| 最近记录: |