Issue with changing mqtt uri prefix?

Q:
Trying to write an android application that connects to an mqtt broker to subscribe and publish topics. Found out that the Java library (paho mqtt library: Paho MQTT C Client Library: MQTTClient_connectOptions Struct Reference) only accepts uris that start with ‘tcp://’ or ‘ssl://’. The mqtt uri in the rabbitMQ secret starts with the prefix mqtt:// unable to use it in the application at the moment.

Is there a way to get a uri that starts with ‘tcp://’?
Have tried just changing the prefix of the existing rabbitMQ uri from mqtt to tcp, but that ends up with the application crashing.


A:
According to the documentation, the format of URIs should be like this:
protocol://host:port
And the host should be the “host” in the rabbitMQ secret, e.g rabbitmq.pub.wise-paas.com
So the full URI should be tcp://rabbitmq.pub.wise-paas.com:1883