mqtt

How to target specific workers with shared subscriptions in MQTT 5?

佐手、 提交于 2019-12-13 23:30:38
问题 One of the new features of MQTT 5 is the shared subscriptions feature, which allows client-side load balancing between multiple workers, so that multiple workers can be responsible for handling messages, but every message is only ever sent to a single server. By default, this works with a round-robin approach, but I am in the need of a slightly more advanced scenario: What I want is some kind of routing, so that one of the messages' properties gets used as some kind of routing key. I.e., I

Azure topic and sending message over MQTT

早过忘川 提交于 2019-12-13 20:17:42
问题 Is it possible to send messages to azure to any custom topic via mqtt. All example that I've found so far work with standard topics 'devices/' + hubName + '/messages/events/' 'devices/' + hubName + '/messages/devicebound/#' Btw, I tried to send/subscribe on the topic/subscription above with MQTT.fx application and never received messages, although the connection was successful. 回答1: Did you have a look on these ?? Azure IoT Hub - Send message (C2D) to one device on 2 topics instead of

Mosquitto Service issue on Windows

假装没事ソ 提交于 2019-12-13 20:15:47
问题 After I made changes to the mosquitto.conf file for adding TLS support, I restarted the Mosquitto Broker service but its not starting. The error says the Mosquitto Service started on Local computer and then stopped - # MQTT over TLS listener 8883 cafile C:Program Files (x86)mosquittocertificatesca.crt certfile C:Program Files (x86)mosquittocertificatesserver.crt keyfile C:Program Files (x86)mosquittocertificatesserver.key This error also occurs when I made changes to the mosquitto.conf file-

Can I send a message to a group of Azure IoT Hub Devices connected via MQTT WebSocket?

十年热恋 提交于 2019-12-13 15:39:19
问题 Goal: Send messages to a group of Azure IoT Hub Devices that are connected via MQTT WebSocket. Initial Idea: Have a group of IoT Hub Devices (group X) subscribe to messages with topic X. Problem: On the Communicate with your IoT hub using the MQTT protocol docs, I don't see a way to subscribe a device to additional topics. I only see examples of a subscription to a device specific endpoint devices/{device_id}/messages/devicebound/# . The page goes on to say "IoT Hub is not a general purpose

MQTT Client subscribe to PostgreSQL DB Changes

耗尽温柔 提交于 2019-12-13 15:26:35
问题 I have a PostgreSQL DB that updates periodically, and want to publish the latest changes to a mosquitto broker. What is the most elegant way to do this approach ? 回答1: Ok this idea is interesting i am using PostgreSQL 9.5 and in the console if i type CREATE LANGUAGE plpythonu; the python language is available. But how i can receive the whole database and the periodically changes of the database into my Broker. CREATE FUNCTION publishChanges () RETURNS integer AS $$ import paho.mqtt.client as

How to configure MQTT-SN topic IDs in RSMB

吃可爱长大的小学妹 提交于 2019-12-13 14:37:51
问题 my question is regarding the configuration of the RSMB using MQTT topic names and MQTT-SN topic ids over a MQTT-SN gateway. Using the "Getting started with the Really Small Message Broker" information is very useful to figure out how to configure topic name mapping in the case of connecting two Really Small Message Brokers together. Regarding to the MQTT-SN specification v1.2 in section "6.10 Gateway's Publish Procedure", the gateway (in my case a gateway included in the RSMB, using the

Publish image data on Mqtt broker

不羁的心 提交于 2019-12-13 11:09:17
问题 I want to send the image byte array to the subscriber through the mqtt broker. But the size of the image byte array data is too big to be published on the mqtt broker, so how can I send the image byte array data to the subscriber? PicBitmap = ((BitmapDrawable)iVpic.getDrawable()).getBitmap(); ByteArrayOutputStream bos = new ByteArrayOutputStream(); PicBitmap.compress(Bitmap.CompressFormat.PNG, 100, bos); picbyte = bos.toByteArray(); String s = Base64.encodeToString(picbyte,Base64.DEFAULT);

To write chat programming using UDP and MQTT protocol in Android

 ̄綄美尐妖づ 提交于 2019-12-13 08:31:11
问题 I am new in Android programming and don't know how to work with UDP and MQTT protocol in android device I want to build an application for chatting android to android device within room connected to same Wi-Fi router. But I don't know what IP address and port I should bind to DatagramSocket and DatagramPacket. I tried lot of examples from online but I didn't understand how it will work in android. 回答1: MQTT requires TCP, it is a statefull protocol, you can not implement it with UDP There is a

How to Publish Binary Data Using Thingsboard and MQTT API?

a 夏天 提交于 2019-12-13 07:34:52
问题 Per Thingsboard documentation, By default, ThingsBoard supports key-value content in JSON. Key is always a string, while value can be either string, boolean, double or long. Using custom binary format or some serialization framework is also possible. See protocol customization for more details... However, the protocol customization does not say much details. Can someone give more details about how to do publish binary data in Thingsboard using its MQTT API? Any help would be appreciated. 回答1:

How to get topic of mqtt client in websocket server

て烟熏妆下的殇ゞ 提交于 2019-12-13 07:19:26
问题 I am trying to get topic of mqtt client, i searched in google, i couldn't find right one. for example, from mqtt client, publish one message,consider server topic is 'topicOfServer' and client topic is 'topicOfClient'. client.publish('topicOfServer','hi server'); server will get 'hi server' message. but how do server knows that message came from which client ex: 'topicOfClient' 回答1: You seam to be confusing a couple of things here Topics are just "addresses" that any MQTT client can send a