Community Articles
Find and share helpful community-sourced technical articles.
Labels (1)
Rising Star

We can configure multiple listeners by giving comma-separated list of URIs that Kafka will listen on. Please follow the steps below to implement this:

1. Add the listeners as comma separated value in Ambari ->kafka->configs->listeners, for example:

listeners=PLAINTEXT://myhost:6667, PLAINTEXTSASL://myhost:6668

2. Add ACL for 'Anonymous' user, because In PLAINTEXT connections user's identity is set to Anonymous. For example :

$ bin/ --authorizer --authorizer-properties zookeeper.connect=ambari-server:2181 --add --allow-principal User:Anonymous --producer --topic topic-oct

3. Run the producer with security protocol set to PLAINTEXT to listen to PLAINTEXT and set it to PLAINTEXTSASL to listen to other listener, something like this:

$ bin/ --broker-list --topic topic-oct --security-protocol PLAINTEXT

$  bin/ --broker-list --topic topic-oct --security-protocol PLAINTEXTSASL

Kindly replace broker hostname:port, zookeeper hostname:port and topic names according to the values configured in your cluster.

Note- This is only supported in HDP 2.3.4+. It is not available in prior versions.

Take a Tour of the Community
Don't have an account?
Version history
Last update:
‎03-24-2017 05:59 PM
Updated by:
Top Kudoed Authors
; ;