We need to organize a way to exchange messages between servers in multiple data centers. Messages are not critical. We just need to be able to send messages from any servers in any data centers to any other servers in any data centers.
We are thinking to use Kafka as a message broker for this use case, but we are not sure if it is a good option.
As we understand Kafka won't work normally if the cluster is distributed between multiple data centers (because it has to work with Zookeeper which is more like a single data center solution). We think of using separate clusters in each data center. Each server has to have a connection to all Kafka clusters in all data centers. That is why any server can send a message to any other server in any data center.
So, each server will have n connections. Total number of all connections will be: n*m, where n - is the total number of data centers, and m is the total number of servers.
Is it possible to reduce the total number of connections to m? I.e. that all servers would be connected only to local Kafka clusters.