Accessing internal listener of AMQ Stream using credentials

Solution Unverified - Updated -


  • Red Hat AMQ Streams (AMQ Stream)
    • 2.2
  • Red Hat OpenShift Container Platform (RHOCP)
    • 4.10
  • AMQ Stream operator's custom resource configuration:

      - authentication:
          type: scram-sha-512
        name: plain
        port: 9092
        tls: false


  • How to access to the internal listener using credentials.


Use the following command to access to the internal listener with the provided credentials:

$ oc run kafka-producer -ti --rm=true --restart=Never -- /bin/bash -c "cat >/tmp/ <<EOF 
> security.protocol=SASL_PLAINTEXT
> sasl.mechanism=SCRAM-SHA-512
> required username=newuser password=newpassword;
> bin/ --broker-list my-cluster-kafka-bootstrap:9092 --topic my-topic  --producer.config=/tmp/
> "

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.