Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » mqtts protocol?(Connection issues using mqtts protocol)
mqtts protocol? [message #1773176] Fri, 22 September 2017 18:17 Go to next message
Chuck Williams is currently offline Chuck WilliamsFriend
Messages: 2
Registered: August 2017
Junior Member
I have the following connection string from one of my development portals:


I'm trying to use the Sample class in the Java Paho client and I'm getting the following exception:

Exception in thread "main" java.lang.IllegalArgumentException: mqtts://
at org.eclipse.paho.client.mqttv3.MqttConnectOptions.validateURI(
at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(
at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(
at org.eclipse.paho.client.mqttv3.MqttClient.<init>(
at com.rfidcollect.iot.Sample.<init>(
at com.rfidcollect.iot.Sample.main(

I've already modified the sample code to not use tcp: as the protocol. Here are the arguments to the execution of the Sample class:

-a subscribe -t 0514da43-afd0-482b-ba9e-ab61772d3fb3/atom/6081f9fffe000957/rx/# -b mqtts:// -p 28103

Thank you in advance,
Re: mqtts protocol? [message #1773239 is a reply to message #1773176] Mon, 25 September 2017 09:27 Go to previous messageGo to next message
James Sutton is currently offline James SuttonFriend
Messages: 71
Registered: July 2015
Hi Chuck,

mqtt or mqtts isn't an official uri scheme ( so that would be unlikely to work.

If you check the code where the exception was thrown, you'll see that only tcp, ws, wss, ssl and local are valid and accepted URI schemes. (

I imagine that you've got mqtts instead of mqtt to indicate that it's a secure connection? If that's the case, you'll want to use the ssl uri scheme and use the SSL arguments (v / k / w / r)
Re: mqtts protocol? [message #1822722 is a reply to message #1773239] Thu, 12 March 2020 09:22 Go to previous message
Sameer Deswal is currently offline Sameer DeswalFriend
Messages: 1
Registered: March 2020
Junior Member
Hi @James Sutton
I'm not sure whether ws, wss supported URI schemes. Do you
Previous Topic:Java MQTT5 implementation
Next Topic:How correct method for test my mqtt client with Junit 5?
Goto Forum:

Current Time: Mon Oct 26 12:14:26 GMT 2020

Powered by FUDForum. Page generated in 0.09168 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top