edgent-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale LaBossiere <dml.apa...@gmail.com>
Subject Re: SSL Connection to MQTT
Date Fri, 05 Aug 2016 14:18:53 GMT

There’s a general MqttSample that should also work w/SSL configs here https://github.com/apache/incubator-quarks/blob/master/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/mqtt/README
<https://github.com/apache/incubator-quarks/blob/master/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/mqtt/README>

If the mqtt server uses a CA-signed certificate, then all you should have to do is specify
use of the ssl://… MQTT server URL.

For a non-CA-signed cert, you’ll have to manually add the server’s cert to a trust store
and set the MqttConfig’s “trustStore” and “trustStorePassword” items for it.

There's an SSL config test for MqttStreams here that nets out to the above:  https://github.com/apache/incubator-quarks/blob/master/connectors/mqtt/src/test/java/org/apache/edgent/test/connectors/mqtt/MqttStreamsTestManual.java#L1155
<https://github.com/apache/incubator-quarks/blob/master/connectors/mqtt/src/test/java/org/apache/edgent/test/connectors/mqtt/MqttStreamsTestManual.java#L1155>

Hope that helps.
— Dale


> On Aug 5, 2016, at 8:24 AM, Bruce M Potter <bp@us.ibm.com> wrote:
> 
> 
> 
> I want to have my quarks app make a secure connection to an mqtt broker.
> So far i've succeeded in connecting to the broker using the connect() and
> publish() methods of org.eclipse.paho.client.mqttv3.MqttClient.  But i'm
> not sure how to integrate that with my topology stream.  And i can't find
> an example of using quarks.connectors.mqtt.MqttConfig and
> quarks.connectors.mqtt.MqttStreams with ssl and can't quite work it out
> from the javadoc.  What have others done when they want to publish stream
> data to mqtt using ssl?  Are there any examples?  Thx.
> 
> Bruce Potter        STSM, Cloud Innovation Lab Architect, IBM,
> Poughkeepsie, NY
> Email: bp@us.ibm.com    Phone:  external: 845-433-7073, internal: TL
> 293-7073


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message