Configuring "advertised.listeners"

Hey everyone, i have a question about configuring “advertised.listeners” because i run 4 docker in EC2 instance. the question is how i can configure connection between those docker container and my database? Thanks!!

Advertised listeners is between client and brokers. I don’t understand what the database has to do with it. Can you maybe explain a bit more your question?

Yeah of course and thanks for your reply, and more detail i have kafka run in docker and i want to configure a external connection for those containers in docker-compose file.