mqtt

MQTT: Can ping server and client machine, but can't connect to broker

痞子三分冷 提交于 2019-12-11 16:31:15
问题 I have a laptop with a NodeJS client that should connect to an MQTT broker on an Ubuntu PC. The broker is running with TCP port 1883 and websocket port 9883. But when I run the client, it does not see the broker - only if I run the client program on the same PC the broker is on, it connects. This used to work before. I changed a few things about the network interfaces but reverted everything - so I have no idea what might be causing this. I added an alias for one of the eth interfaces, but

Disable retained MQTT messages in Rabbit MQ

守給你的承諾、 提交于 2019-12-11 16:15:42
问题 For legacy reasons, I need to disable retained messages on an MQTT node running RabbitMQ. After researching the issue, it appears that the Rabbit MQ team has indeed added such a feature in a file called rabbit_mqtt_retained_msg_store_noop.erl. I am otherwise unfamiliar with the codebase and could not find mention of the noop retainer anywhere in the documentation. How do I enable rabbit_mqtt_retained_msg_store_noop ? 回答1: rabbit_mqtt_retained_msg_store_noop is enabled by adding thefollowing

How to get the QoS of a client in HiveMQ Client?

空扰寡人 提交于 2019-12-11 15:28:53
问题 I'm working with HiveMQ Client and I wanted to know if there was a way to get the quality of service (QoS) that a client is subscribing with (in terms of a specific topic or in general)? I would be looking for a method I could invoke on a client like so: Mqtt5BlockingClient subscriber = Mqtt5Client.builder() .identifier(UUID.randomUUID().toString()) // the unique identifier of the MQTT client .serverHost("localhost") .serverPort(1883) .buildBlocking(); subscriber.getQoS("topic") // returns

What is difference between MQTTAsync_onSuccess and MQTTAsync_deliveryComplete callbacks?

我怕爱的太早我们不能终老 提交于 2019-12-11 14:53:29
问题 I'm learning about MQTT (specifically the paho C library) by reading and experimenting with variations on the async pub/sub examples. What's the difference between the MQTTAsync_deliveryComplete callback that you set with MQTTAsync_setCallbacks() vs. the MQTTAsync_onSuccess or MQTTAsync_onSuccess5 callbacks that you set in the MQTTAsync_responseOptions struct that you pass to MQTTAsync_sendMessage() ? All seem to deal with "successful delivery" of published messages, but from reading the

How do I setup a Android MQTT project using ia92 wmqtt.jar?

♀尐吖头ヾ 提交于 2019-12-11 13:47:24
问题 I have been trying to implement an MQTT service using wmqtt.jar. Like most folks I started with looking at other peoples examples. I found several references to Dale Lane's post http://dalelane.co.uk/blog/?p=1599 and downloaded a version of his service from http://mosquitto.org/2011/11/android-mqtt-example-project/. My problem is that every example I try to run that uses wmqtt.jar in my emulator the code crashes as soon as any class that references MqttSimpleCallback with ajava.lang

NodeMCU and ESP8266: slow mqtt publish

▼魔方 西西 提交于 2019-12-11 13:15:17
问题 I'm using esp8266 with the firmware produced with Marcel's NodeMCU custom builds http://frightanic.com/nodemcu-custom-build/ I tested the "dev" branch and the "master". I changed a little bit the " Connect to MQTT Broker " code found here https://github.com/nodemcu/nodemcu-firmware -- init mqtt client with keepalive timer 120sec m = mqtt.Client("clientid", 120, "user", "password") m:on("connect", function(con) print ("connected") end) m:on("offline", function(con) print ("offline") end) -- m

MQTT / ESP8266 / NodeMCU / Lua code not publishing

∥☆過路亽.° 提交于 2019-12-11 11:55:27
问题 I have a problem with the following Lua code on an ESP8266... function sendData(humidity,temperature) -- Setup MQTT client and events print("sendData() entered") print("Setting up mqtt.Client...") m = mqtt.Client(mqtt_client_id, 120, username, password) print("Attempting client connect...") m:connect(mqtt_broker_ip , mqtt_broker_port, 0, function(conn) print("Connected to MQTT") print(" IP: " .. mqtt_broker_ip) print(" Port: " .. mqtt_broker_port) print(" Client ID: " .. mqtt_client_id) print

Connecting Mosquitto to the new Azure MQTT backend

假装没事ソ 提交于 2019-12-11 11:06:39
问题 Recently Microsoft Azure has added a MQTT backend to its' services. This service uses TLS do encrypt its traffic. I can't connect between Mosquitto and the Microsoft Azure Cloud. I downloaded the server certificate with echo -n | openssl s_client -connect mytarget.azure-devices.net:8883 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/test.cert And then tried to connect with mosquitto_sub mosquitto_sub -h mytarget.azure-devices.net -p 8883 -d -t devices/Device1/messages/events -i

spring mqtt: catch ConnectException

拜拜、爱过 提交于 2019-12-11 10:43:27
问题 I have a question about spring. I make a connection with MQTT broker using Spring-Paho MqttPahoMessageDrivenChannelAdapter . Here is a java config part: @Bean @Description("mqtt inbound adapter: receives mqtt messages") public MessageProducer mqttInboundAdapter() { log.info("creating mqtt inbound adapter"); MqttPahoMessageDrivenChannelAdapter adapter = new MqttPahoMessageDrivenChannelAdapter( env.getProperty("mqtt.hostname")+":" +env.getProperty("mqtt.port"), "myClient", "#"); adapter

Spark streaming using MQTTutils to subscribe topic from activemq with authentication

那年仲夏 提交于 2019-12-11 09:09:57
问题 It seems MQTTUtils Only provide three methods, def createStream(jssc: JavaStreamingContext, brokerUrl: String, topic: String, storageLevel: StorageLevel): JavaDStream[String] Create an input stream that receives messages pushed by a MQTT publisher. def createStream(jssc: JavaStreamingContext, brokerUrl: String, topic: String): JavaDStream[String] Create an input stream that receives messages pushed by a MQTT publisher. def createStream(ssc: StreamingContext, brokerUrl: String, topic: String,