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)