Kafka External Access

Prev Next

I tried to get an access to my AWS EC2 Kafka in my local machine. Figure 1 demonstrates that the access is not available to my deployed Kafka in AWS EC2.

Figure 1

I use security group functionality of AWS to open ports. Figure in Appendix D shows that my instance has 22, 443 and 80 open ports. Kafka uses port 9092. That is why, I added port 9092 protocol TCP to my security group. Figure 2 illustrates that connection is succeeded to Kafka.

Figure 2

I try to connect to Kafka broker, to my topic mole-image-request-topic. However, the Kafka returns the exception that internal port is known. Figure 3 illustrates the error from Kafka. One of possible solution is adding advertised.listeners setting into servers.properties file of Kafka. Figure 4 shows my settings in my servers.properties file.

Figure 3
Figure 4
AWS EC2 Open Inbound ports, add port 9092
External access to Kafka is succeeded
Added advertised.listeners into servers.properties, broker is connected

Next

--

--