2

I am trying to set the advertised.listeners config of my MSK cluster. However, I am getting the following error back:

requirement failed: inter.broker.listener.name must be a listener name defined in advertised.listeners

I am not sure what this error means. I have tried searching for it but nothing comes up. I have all my VPC related config setup. I am able to read the topic names and other configuration from the cluster.

I am using the Admin client of python's confluent_kafka module.

Here is the code:

import confluent_kafka.admin
from confluent_kafka.admin import AdminClient, ConfigResource

a = AdminClient({'bootstrap.servers': '<server>:<port>'})
print(a.list_topics(timeout=5).topics) # Confirm connection

resources = list()
resources.append(ConfigResource(restype='BROKER',name='<broker_id', set_config={'advertised.listeners':'REPLICATION://<server>:<port>'}))
returned_futures = a.alter_configs(resources)
prats
  • 225
  • 5
  • 15
  • inter.broker.listener.name is a Broker config that also needs set, and needs to be a protocol of the advertised listeners – OneCricketeer Dec 12 '20 at 20:06
  • @OneCricketeer I can't change this config dynamically for my MSK cluster. Is this something I need to define in the cluster config during startup? – prats Dec 13 '20 at 14:05
  • You don't need to change it. You can lookup the current value, and ensure the advertised listeners contains that protocol – OneCricketeer Dec 13 '20 at 15:13
  • @OneCricketeer Got it. That worked. Thanks. Another quick question. In the inter.broker.listener.name I am only seeing REPLICATION_SECURE. Shouldn't it include REPLICATION, CLIENT, CLIENT_SECURE as well? My clusters encryption info is set to TLS_PLAINTEXT – prats Dec 13 '20 at 16:32
  • It can only be a single value – OneCricketeer Dec 14 '20 at 14:43
  • Hi, How can i get the ` – panda0 Jun 15 '21 at 11:31

0 Answers0