Thanks to visit codestin.com
Credit goes to github.com

Skip to content

netmoregroup/netmore-mqtt-java-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Netmore Connect sample application.

This sample application is written in java, for payload information see the javascript sample

Setup.

Unpack the certs you have received into the certs directory, when done it should look like below where CommonName is extracted from the certificate (this normally the same as customerId)

ls ./certs/<CommonName>/
ca.crt
client.crt
client.key

Create a p12 file to import into the java keystore.

openssl pkcs12 -export -out client.p12 -inkey client.key -in client.crt

Install dependencies

Install the mqtt node libraries using maven.

mvn install

Run

In order to run the application you need the common name from the certificate this can be retrieved in various ways but the simplest is

openssl x509 -in ./client.crt -noout -text

Compile the code:

mvn compile

Once you found the CN short for common name you can add that as the last argument to the command below.

mvn exec:java -D exec.args="<commonName>"

About

Netmore MQTT Java sample

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages