久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

用于訂閱/發(fā)布 MQTT (Really Small Message Broker) 的 C#

C# client library for subscribing/publishing MQTT (Really Small Message Broker)(用于訂閱/發(fā)布 MQTT (Really Small Message Broker) 的 C# 客戶(hù)端庫(kù))
本文介紹了用于訂閱/發(fā)布 MQTT (Really Small Message Broker) 的 C# 客戶(hù)端庫(kù)的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

我需要為 Android 實(shí)現(xiàn)推送通知,但將無(wú)法訪問(wèn) Internet,并且只能訪問(wèn) Intranet.所以我想我不能使用 C2DM 和第三方 API,比如 UrbanAirship.所以我正在考慮使用 MQTT RSMB(真正的小型消息代理)、C# .net 作為代理的發(fā)布者和 Android 的 wMqtt.jar 作為代理的訂閱者.

我已經(jīng)下載了 RSMB 并找到了以下 exe:-broker.exe-stdinpub.exe-stdoutsub.exe

我已成功從 Android 訂閱并使用帶有主題的 stdinpub.exe 發(fā)布消息.

我想從你們那里得到一些關(guān)于以下方面的建議:

1). RSMB 是免費(fèi)的嗎?還有其他適合我的選擇嗎?

2).我將如何使用 C#(用于發(fā)布和訂閱)連接到 RSMB 代理.是否有任何用于 RSMB 的 C# 客戶(hù)端庫(kù)?

3).MQTT的性能和可靠性如何?我可能需要同時(shí)推送數(shù)百條消息.

4).如果沒(méi)有其他方法,那么我正在考慮在我的 C# 應(yīng)用程序中執(zhí)行 stdinpub.exe.(這可能聽(tīng)起來(lái)很糟糕).

我發(fā)現(xiàn)網(wǎng)絡(luò)上關(guān)于 MQTT 的信息很少,我真的應(yīng)該這樣做還是有其他選擇?

解決方案

好的,這里有一個(gè)細(xì)目:

1) 您需要閱讀下載 RSMB 時(shí)附帶的許可證文件.我的理解是您不能將 RSMB 用于商業(yè)目的,如果 IBM 將其作為商業(yè)產(chǎn)品發(fā)布,您必須停止使用它.

有一個(gè)名為 Mosquitto(我開(kāi)發(fā)的)的開(kāi)源 MQTT 代理可用.它提供完整的 MQTT 協(xié)議支持,可用于多種平臺(tái).它還包括 C 語(yǔ)言的客戶(hù)端庫(kù),帶有 C++ 和 Python 包裝器,以及示例發(fā)布和訂閱客戶(hù)端.您可以在 http://mosquitto.org/

獲得更多信息

2) 有兩個(gè) C# 庫(kù)可用,盡管我自己從未使用過(guò)它們.您可以在 http://mqtt.org/software>

3) 我讓 RSMB 和 Mosquitto 在一臺(tái)舊的 VIA C3 600MHz 機(jī)器上每秒處理 1500 條消息(每條 100 字節(jié)).在更現(xiàn)代的硬件上,我希望它們的性能明顯更好.

關(guān)于MQTT的信息,希望mosquitto網(wǎng)站上有合理的數(shù)量——見(jiàn)http://例如,mosquitto.org/man/mqtt-7.html 概述.您也可以在 http://webchat.freenode.net/ 的 Freenode 網(wǎng)絡(luò)上的 #mqtt irc 頻道上提問(wèn).還有一個(gè)位于 https://launchpad.net/~mqtt-users 的郵件列表,可能有用.

恐怕我無(wú)法真正評(píng)論您是否應(yīng)該使用 MQTT 或其他東西.

I need to implement the push notification for Android but there will not be internet access and only intranet access is available. So I think I cannot use C2DM and third party API like UrbanAirship. So I am thinking of using MQTT RSMB(Really Small Message Broker), C# .net as Publisher to the broker and wMqtt.jar for Android as subcriber to the broker.

I have downloaded the RSMB and found the followings exe: -broker.exe -stdinpub.exe -stdoutsub.exe

I have successfully subscribed from Android and published messages using stdinpub.exe with topic.

I would like to get some advice from you guys on the followings :

1).Is RSMB free? Is there any other alternatives that suit my case?

2).how will I be able to connect to the RSMB broker using C# (for publishing and subscribing). Are there any C# client library for RSMB?

3).How is the performance and reliability of the MQTT ? I might need to push a few hundreds of messages at the same time.

4).If there is no other ways then I am thinking of executing the stdinpub.exe inside my C# application.(It might sound bad).

I find that there is very little information about MQTT on the web and should I really go that way or are there any other alternatives?

解決方案

Ok, here's a breakdown for you:

1) You need to read the license file that was included with RSMB when you downloaded it. My understanding is that you can't use RSMB for commercial purposes and if IBM release it as a commercial product you have to stop using it.

There is an open source MQTT broker available called Mosquitto (which I develop). It provides full MQTT protocol support and is available for a number of platforms. It also includes client libraries in C, with C++ and Python wrappers, as well as example publish and subscribe clients. You can get more information at http://mosquitto.org/

2) There are two C# libraries available, although I've never used either of them myself. You can find a link to them as well as a whole load of other MQTT related software at http://mqtt.org/software

3) I've had RSMB and Mosquitto handling 1500 messages (100 bytes each) per second on an old VIA C3 600MHz machine. On more modern hardware I'd expect them to perform significantly better.

With regards to information on MQTT, I hope that there is a reasonable amount on the mosquitto website - see http://mosquitto.org/man/mqtt-7.html for an overview for example. You can also come ask questions on the #mqtt irc channel on the Freenode network at http://webchat.freenode.net/ There is also a mailing list at https://launchpad.net/~mqtt-users which may be of use.

I'm afraid I can't really comment on whether you should be using MQTT or something else.

這篇關(guān)于用于訂閱/發(fā)布 MQTT (Really Small Message Broker) 的 C# 客戶(hù)端庫(kù)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

LINQ to SQL and Concurrency Issues(LINQ to SQL 和并發(fā)問(wèn)題)
SQL Server 2005 Transaction Level and Stored Procedures(SQL Server 2005 事務(wù)級(jí)和存儲(chǔ)過(guò)程)
Yield return from a try/catch block(try/catch 塊的收益回報(bào))
Should I call Parameters.Clear when reusing a SqlCommand with a transation?(重用帶有事務(wù)的 SqlCommand 時(shí),我應(yīng)該調(diào)用 Parameters.Clear 嗎?)
Does SqlTransaction need to have Dispose called?(SqlTransaction 是否需要調(diào)用 Dispose?)
Reason for System.Transactions.TransactionInDoubtException(System.Transactions.TransactionInDoubtException 的原因)
主站蜘蛛池模板: 国产成人精品毛片 | 国产黄网 | 亚洲天堂av在线播放 | 亚洲欧美在线一区 | www.欧美日韩 | 美日韩精品 | 能看毛片的网站 | 黄色免费av| 97在线免费| 亚洲九九夜夜 | 日韩中文字幕在线观看 | 亚洲另类自拍 | 免费av播放 | 国产精品一区二区在线播放 | 亚洲久久久 | 人人干人人艹 | 免费激情网站 | 欧美日韩视频 | 夜夜嗨av一区二区三区 | 香蕉视频一区二区三区 | av第一页| 国产黄色片在线观看 | 日韩午夜精品 | 日韩欧美国产一区二区三区 | 欧美亚洲在线 | 亚洲精品黄 | 日本一级大片 | 欧美精品二区三区四区免费看视频 | 91av在线免费观看 | 男女av网站 | 热久久久久 | 欧美日韩精品一区二区三区 | 亚洲精品二区 | 师生出轨h灌满了1v1 | 免费一区二区视频 | 久久99久久99 | 精品在线看 | 国产超碰在线观看 | 亚洲最大av网站 | 肉丝美脚视频一区二区 | 日本在线视频观看 |