I am using the Debezium Postgres connector. I have two tables in Postgres named 'publications' and 'comments'. kafka and zookeeper are running in docker containers as per the standard examples. The postgres is running locally. After using the debezium postgres connect, I have the following topics :
$ bin/kafka-topics.sh --list --zookeeper localhost:2181
- __consumer_offsets
- dbserver1.public.comments
- dbserver1.public.publications
- my_connect_configs
- my_connect_offsets
- my_connect_statuses
I would like to see a list of messages in the topic:
$ bin/kafka-console-consumer.sh --bootstrap-server kafka:9092 --topic dbserver1.public.publications
[2019-06-03 21:55:16,180] WARN [Consumer clientId=consumer-1, groupId=console-consumer-5221] Connection to node -1 (kafka/23.202.231.166:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient) [2019-06-03 21:55:16,289] WARN [Consumer clientId=consumer-1, groupId=console-consumer-5221] Connection to node -1 (kafka/23.202.231.166:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient) [2019-06-03 21:55:16,443] WARN [Consumer clientId=consumer-1, groupId=console-consumer-5221] Connection to node -1 (kafka/23.202.231.166:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient) [2019-06-03 21:55:16,721] WARN [Consumer clientId=consumer-1, groupId=console-consumer-5221] Connection to node -1 (kafka/23.202.231.166:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient) [2019-06-03 21:55:17,145] WARN [Consumer clientId=consumer-1, groupId=console-consumer-5221] Connection to node -1 (kafka/23.202.231.166:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient) [2019-06-03 21:55:18,017] WARN [Consumer clientId=consumer-1, groupId=console-consumer-5221] Connection to node -1 (kafka/23.202.231.166:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient) ^CProcessed a total of 0 messages
$ bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic dbserver1.public.publications
[2019-06-03 21:55:16,180] WARN [Consumer clientId=consumer-1, groupId=console-consumer-5221] Connection to node -1 (kafka/23.202.231.166:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
How do I specify the correct value for bootstrap-server? Thanks.
kafka:9092
is, only the Docker network does... Did you mean to use localhost like you did for Zookeeper? – OneCricketeer