mqtt

Can a web browser use MQTT?

人盡茶涼 提交于 2019-11-30 06:18:54
问题 We are looking at using MQTT as the messaging protocol on a new device we're building. We'd also like a web interface for the device. Does anyone know if you can implement a browser client app (without additional plugins) that talks MQTT? 回答1: Yes, as mentioned in Steve-o's comment MQTT via websockets is very possible. There are 2 options at the moment IBM's MQ 7.5 comes with websockets support, you can find details here. The Mosquitto broker has a javascript client with an example running

MQTT client for iPhone

回眸只為那壹抹淺笑 提交于 2019-11-30 05:43:39
I am trying to follow this blog for building push services for iPhone. The blog uses Android as the working platform,but it can be migrated to iPhone too, provided I get an MQTT client in objective C..which I cant find anywhere. The closest I got to this is : I got a C implementation here - libmosquitto This post says I can use something like an HTTP bridge. Can anyone please help me exploit these two options ? I dont know the next step to take :( Thanks !! The HTTP option would not help you in this case as you're not trying to talk to a JMS app via MQ (well - you haven't said that is your

Is message order preserved in MQTT messages?

浪尽此生 提交于 2019-11-30 04:43:32
I wonder if the message sent order is preserved. That is, when a publisher sends a sequence of messages, is each subscriber guaranteed to receive the same sequence as the publisher had sent it? For both clean and persistent sessions? A summary of the message ordering capabilities in MQTT 3.1.1 can be found in the specification itself here . In summary: no guarantees are made about the relative ordering of messages published with different QoS values. (for example, QoS 0 can over take QoS 2 for example as it involves a single packet rather than the 4 packets of the latter). QoS 0 messages will

Schema Registry 教程

感情迁移 提交于 2019-11-30 02:49:19
物联网设备终端种类繁杂,各厂商使用的编码格式各异,所以在接入物联网平台的时候就产生了统一数据格式的需求,以便平台之上的应用进行设备管理。 EMQ X 企业版 3.4.0 提供了 Schema Registry 功能,提供编解码能力。Schema Registry 管理编解码使用的 Schema、处理编码或解码请求并返回结果。Schema Registry 配合规则引擎,可适配各种场景的设备接入和规则设计。 数据格式 下图展示了 Schema Registry 的一个应用案例。多个设备上报不同格式的数据,经过 Schema Registry 解码之后,变为统一的内部格式,然后转发给后台应用。 [图1: 使用 Schema Registry 对设备数据进行编解码] 二进制格式支持 EMQ X 3.4.0 内置的 Schema Registry 数据格式包括 Avro 和 Protobuf 。Avro 和 Protobuf 是依赖 Schema 的数据格式,编码后的数据为二进制,使用 Schema Registry 解码后的内部数据格式(Map,稍后讲解) 可直接被规则引擎和其他插件使用。此外 Schema Registry 支持用户自定义的 (3rd-party) 编解码服务,通过 HTTP 或 TCP 回调的方式,进行更加贴近业务需求的编解码。 架构设计 Schema

Implement Eclipse MQTT Android Client using single connection instance

一个人想着一个人 提交于 2019-11-29 23:26:46
问题 I am using Eclipse Paho android mqtt service in my app. I am able to subscribe and publish the messages to mqtt broker. I have couple of Activities in the app, when any activity is started it connects to broker using mqttAndroidClient.connect(null, new IMqttActionListener() {} and gets the response in mqttAndroidClient.setCallback(new MqttCallback() {} . My questions: Is this the correct way to implement the android mqtt service ? Is there a way to use same connection and callback instance

How do you set up encrypted mosquitto broker like a webpage which has https?

*爱你&永不变心* 提交于 2019-11-29 21:57:38
I'm trying to setup a mosquitto broker which is encrypted using ssl/tls. I don't want to generate client certificates. I just want an encrypted connection. The man page only described the settings which are available, not which are needed and how they are used. Which settings are needed and how do you set them? I use mosquitto 1.3.5 Gussoh There is a small guide here, but it does not say much: http://mosquitto.org/man/mosquitto-tls-7.html You need to set these: certfile keyfile cafile They can be generated with the commands in the link above. But easier is to use this script: https://github

MQTT Broker 选型

夙愿已清 提交于 2019-11-29 21:42:55
broker的主要职责是接受发布者发布的所有消息,并将其过滤后分发给不同的消息订阅者。 如今有很多的broker,下面就是一张关于各种broker对比的图片: image 目前我用过的有mosquitto和emqttd(2.0版本后改叫EMQ),因为目前的需求是希望做每秒10万以上的数据接入,所以需要考虑建立集群。但是在使用mosquitto的过程中发现他不支持集群,所以就放弃了,转投emqttd。 在使用mosquitto过程中发现了一些问题: 在使用mosquitto时,如果想使用集群的话,可能会需要进行二次开发。目前只支持桥接。并且他在遍历时的效率非常低,使得他无法支持大量的客户端或者操作过于频繁的操作(比如十万或百万级别的客户端同时发送数据) emqttd有以下优点: 可靠传输。MQTT可以保证消息可靠安全的传输,并可以与企业应用简易集成。 消息推送。支持消息实时通知、丰富的推送内容、灵活的Pub-Sub以及消息存储和过滤。 低带宽、低耗能、低成本。占用移动应用程序带宽小,并且带宽利用率高,耗电量较少。 是中国人写的一个开源的项目,所以使用起来学习成本比较低,容易上手。 EMQ 2.0 (Erlang/Enterprise/Elastic MQTT Broker) 是基于 Erlang/OTP 语言平台开发,支持大规模连接和分布式集群,发布订阅模式的开源 MQTT

Direct MQTT vs MQTT over WebSocket [closed]

你离开我真会死。 提交于 2019-11-29 20:34:32
What are merits of MQTT over WebSocket compared to direct MQTT? I'm considering using MQTT in my project and so I want to know why some people choose MQTT over WebSocket instead of direct MQTT. You should only need to run MQTT over websockets if you intend to publish/subscribe to messages directly from within webapps (in page). Basically I would run pure MQTT for everything and only add the websockets if you actually need it. For all the none browser languages the MQTT client libraries only use native MQTT. For Javascript there is both a pure MQTT library and the Paho in page library that uses

Mqtt How a client can get to know that another client is connected or not

旧时模样 提交于 2019-11-29 18:12:07
Hello guys my problem is that I need to keep device(clients) status as they are online or not. I am connecting through a client id and from subscribing there will topic I can get to know that device is disconnected but if they connect again how can I check they connect again. The short answer is you don't (at a protocol level). Publishers and subscribers are totally unaware of each other, messages are sent to topics not to specific subscribing clients. The slightly longer version: You could do something with retained messages and LWT (Last Will & Testament) e.g. Each client publishes a

Spring Integration MQTT Subscriber (paho) stops processing messages

岁酱吖の 提交于 2019-11-29 18:01:30
We're experiencing an issue with one of our MQTT subscribers in Spring integration (4.0.3.RELEASE running on Tomcat 7 with the Paho MQTT Client 0.4.0). The issue is with a subscriber on a heavily used topic (lots of messages). The devices sending the messages to the topic are devices in the field connecting over GPRS. Spring integration and the broker (Mosquitto) are running on the same server. The issue seems to appear after doing a couple of redeploys on the Tomcat without restarting the server. When the issue occurs, a restart of the tomcat instance fixes it for a while. Here's the chain of