mqtt

MQTT for realtime data streaming

醉酒当歌 提交于 2019-12-08 21:23:26
I was wondering if the MQTT protocol is suited for some high refresh rate data streaming. As it was designed for low-bandwidth high-latency application I was wondering how it would perform in a high-bandwidth low-latency application. What I want is to send sensor data at a rate of 60-120 times per second. Is this something feasible or will some design decisions in MQTT prevent that from working in a usable manner? I would have full control over the broker in this scenario and it would happen at QoS level 0. The payload would be a single 32bit float or 32 integer. All devices would connect over

The callBacklistener is called Twice?

北城余情 提交于 2019-12-08 16:29:38
In the below, when i run it and intentionally turn the WiFi off, the callBack clientCallBack.connectionLost displays the message Log.d(TAG, "@connectionLost: MQTT Server connection lost"); twice. And When I re connect, the message Log.i(TAG, "@onSuccess: Connection Successful."); in the client_1.connect callback is displayed only once. anyone can expain why i receive the message from the calback twice? Code @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mqtt_proj_01_layout); sdCard = Environment

Mosquitto Secure MQTT connection

[亡魂溺海] 提交于 2019-12-08 16:08:32
My Question is regarding TLS/SSL MQTT connection. I've installed moaquitto broker from this website. http://www.eclipse.org/mosquitto/download/ and done with simple subscribe/publish using paho eclipse library in java. then I created X509 certificates using bouncycastle in java. but now I am stuck at server configurations regarding these certificates.I need to use different certificates for different topics on same broker. What I found is the following mosquitto-auth-plug. https://github.com/jpmens/mosquitto-auth-plug But here in mosquitto_auth_plugin we need to define backend databases

Handling MQTT communication inside HTTP request in Node-Red

心不动则不痛 提交于 2019-12-08 14:07:25
In Node-Red, I would like to be able to send a message and wait for its response using MQTT, in between an HTTP input node and a response one. I think a picture is more relevant to explain this: The problem is an HTTP response node has to be directly linked to an input one somehow, so I thought of saving the whole message in context after receiving an HTTP input, then restore it before sending the response. The problem is that apparently, the structure of the message is circular, hence I can't directly convert it to a string, to store it in context. I've tried different things to solve this

Spark Streaming from MQTT - IllegalArgumentException

我怕爱的太早我们不能终老 提交于 2019-12-08 12:17:12
问题 I'm trying to consume messages from RabbitMQ in Spark Streaming following this answer: https://stackoverflow.com/a/38172737/1344854. I'm failing with IllegalArgumentException and I don't know why. 6/09/05 13:23:22 ERROR ReceiverTracker: Deregistered receiver for stream 0: Error starting receiver 0 - java.lang.IllegalArgumentException: ssl://user:password@bunny.cloudamqp.com:8883/vhost at org.eclipse.paho.client.mqttv3.MqttConnectOptions.validateURI(MqttConnectOptions.java:458) at org.eclipse

Paho Python Client with HiveMQ

一笑奈何 提交于 2019-12-08 11:54:07
问题 i am developing a module in python that will allow me to connect my raspberry pi to a version of hivemq hosted on my pc. it connects normally but when i add hivemq's file auth plugin it doesnt seem to work im using the username_pw_set to set my username and password here is what my code currently looks like: import paho.mqtt.client as mqtt client = mqtt.Client() #The callback for when the client recieves a CONNACK response from the server def on_connect(client, userdata, flags, rc): print(

MQTT connection consumes less power

纵饮孤独 提交于 2019-12-08 11:27:27
问题 MQTT is claimed to consume less power for keeping the connection open between broker and client. I believe application layer need not do anything special to persist a TCP connection and MQTT is an application layer protocol. So, how does MQTT improvises in this area? 回答1: HTTP(S) doesn't keep a connection open - so to get the "effect" of a continuous connection, the HTTPS client has to keep making poll requests, each of which involves creating the TCP connection and negotiating SSL/TLS

How to store MQTT Mosquitto publish events into MySQL? [duplicate]

試著忘記壹切 提交于 2019-12-08 08:14:39
问题 This question already has an answer here : Is there a way to store Mosquitto payload into an MySQL database for history purpose? (1 answer) Closed 11 months ago . I've connected a device that communicates to my mosquitto MQTT server (RPi) and is sending out publications to a specified topic. What I want to do now is to store the messages published on that topic on the MQTT server into a MySQL database. I know how MySQL works, but I don't know how to listen for these incoming publications. I'm

Mosquitto Secure MQTT connection

好久不见. 提交于 2019-12-08 07:29:12
问题 My Question is regarding TLS/SSL MQTT connection. I've installed moaquitto broker from this website. http://www.eclipse.org/mosquitto/download/ and done with simple subscribe/publish using paho eclipse library in java. then I created X509 certificates using bouncycastle in java. but now I am stuck at server configurations regarding these certificates.I need to use different certificates for different topics on same broker. What I found is the following mosquitto-auth-plug. https://github.com

MQTT for realtime data streaming

只愿长相守 提交于 2019-12-08 06:09:14
问题 I was wondering if the MQTT protocol is suited for some high refresh rate data streaming. As it was designed for low-bandwidth high-latency application I was wondering how it would perform in a high-bandwidth low-latency application. What I want is to send sensor data at a rate of 60-120 times per second. Is this something feasible or will some design decisions in MQTT prevent that from working in a usable manner? I would have full control over the broker in this scenario and it would happen