burrsutter / rpi_DS18B20

1 stars 4 forks source link

How to setup MQTT on openshift? #5

Open zachariahyoung opened 9 years ago

zachariahyoung commented 9 years ago

What's required to setup the MQTT broker on openshift? I was able to follow this blog post to setup the broker using MQTT. http://wei-meilin.blogspot.com/2014/05/red-hat-openshift-xpaas-simple-mqtt.html

But I'm not able to connect to the MQTT broker in the java code. My current java configuration looks like this.

// Has to be unique across all clients String clientID = "SendTemperatureMQTT-" + id; MqttClient client = new MqttClient("tcp://tempcontainer-zpyoung.rhcloud.com:1883", clientID, new MemoryPersistence()); MqttConnectOptions connOpt = new MqttConnectOptions(); connOpt.setUserName("admin"); connOpt.setPassword("test-".toCharArray()); client.connect(connOpt);

burrsutter commented 9 years ago

Hello Zachariah, I have not yet found the time to work with MQTT+ActiveMQ/A-MQ on Openshift Online. I have only used a localhost ActiveMQ/A-MQ and the Eclipse hosted MQTT broker for my MQTT experiences. I do have this as an open ToDo item, to discover what it takes to support MQTT and ActiveMQ on OpenShift Online.

On Sat, Jun 27, 2015 at 3:17 PM, Zachariah Young notifications@github.com wrote:

What's required to setup the MQTT broker on openshift? I was able to follow this blog post to setup the broker using MQTT. http://wei-meilin.blogspot.com/2014/05/red-hat-openshift-xpaas-simple-mqtt.html

But I'm not able to connect to the MQTT broker in the java code. My current java configuration looks like this.

// Has to be unique across all clients String clientID = "SendTemperatureMQTT-" + id; MqttClient client = new MqttClient("tcp:// tempcontainer-zpyoung.rhcloud.com:1883", clientID, new MemoryPersistence()); MqttConnectOptions connOpt = new MqttConnectOptions(); connOpt.setUserName("admin"); connOpt.setPassword("GFKsd7lEBn2-".toCharArray()); client.connect(connOpt);

— Reply to this email directly or view it on GitHub https://github.com/burrsutter/rpi_DS18B20/issues/5.