Thread overview
Looking for MQTT client library
Mar 12, 2015
o3o
Mar 12, 2015
Dicebot
Mar 12, 2015
Atila Neves
Mar 12, 2015
Orfeo
Apr 10, 2015
Frank Pagliughi
Apr 10, 2015
Jacob Carlborg
Apr 23, 2015
Frank Pagliughi
May 07, 2015
Orfeo
Jul 25, 2015
TC
March 12, 2015
I'm looking a MQTT [0] client library written in D, if it exists.
Anyone know of any?

I found the great Atila Neves MQTT broker (server) [1], and some C/C++ libraries [2], so, possible solutions are:

a. Write a native D library from scratch
b. Adapt/copy some parts of [1] to convert from server to client
c. Create a binding from [2]

Anyone has other idea that I could use to create this
myself?

Thanks

[0]http://mqtt.org/
[1]https://github.com/atilaneves/mqtt
[2]http://www.eclipse.org/paho/clients/c/
March 12, 2015
If it isn't on http://code.dlang.org it is unlikely to exist in easy to use form.
Starting with C bindings is probably the easiest approach - you may want to check out https://github.com/jacob-carlborg/dstep if you haven't already.
March 12, 2015
Those are basically your options. You could wrap Mosquitto (a C implementation), but I'd just use the existing MQTT broker code. Then again, I would say that. :)

Atila

On Thursday, 12 March 2015 at 07:59:55 UTC, o3o wrote:
> I'm looking a MQTT [0] client library written in D, if it exists.
> Anyone know of any?
>
> I found the great Atila Neves MQTT broker (server) [1], and some C/C++ libraries [2], so, possible solutions are:
>
> a. Write a native D library from scratch
> b. Adapt/copy some parts of [1] to convert from server to client
> c. Create a binding from [2]
>
> Anyone has other idea that I could use to create this
> myself?
>
> Thanks
>
> [0]http://mqtt.org/
> [1]https://github.com/atilaneves/mqtt
> [2]http://www.eclipse.org/paho/clients/c/

March 12, 2015
My preferred option is b. that is convert your MQTT broker to MQTT client.

I'm not a MQTT expert, so, in your opinion what parts of your code should I change?
(i.e. message module should be the same, peraphs module stream...)

Thanks for your support

(and also for your unit-threaded project!)


On Thursday, 12 March 2015 at 15:03:13 UTC, Atila Neves wrote:
> Those are basically your options. You could wrap Mosquitto (a C implementation), but I'd just use the existing MQTT broker code. Then again, I would say that. :)
>
> Atila
April 10, 2015
I am writing a D wrapper for the Eclipse Paho C library. I know MQTT, but don't know D very well - this was an attempt for me to learn D a little better for a non-trivial example. It's a little tricky since the underlying library is multi-threaded and making callbacks from different threads.

I have the basics all working on Linux, but need to nail down a few issues of message (data) immutability. And I need to start testing on Windows.

Oh, and I haven't the slightest idea how to package a D library for distribution. Where do I learn how to do that?
April 10, 2015
On 2015-04-10 15:54, Frank Pagliughi wrote:

> Oh, and I haven't the slightest idea how to package a D library for
> distribution. Where do I learn how to do that?

I recommend using Dub [1][2]. Here is the description of the package format [3].

[1] http://code.dlang.org/download
[2] https://github.com/D-Programming-Language/dub
[3] http://code.dlang.org/package-format

-- 
/Jacob Carlborg
April 23, 2015
I got the OK to submit the D library to Eclipse Paho. So, hopefully within the next few weeks there will be a Paho incubator project for the D language client.
May 07, 2015
On Thursday, 23 April 2015 at 14:40:01 UTC, Frank Pagliughi wrote:
> I got the OK to submit the D library to Eclipse Paho. So, hopefully within the next few weeks there will be a Paho incubator project for the D language client.
Hi Frank,
any news about your MQTT client project?

Thank you
July 25, 2015
On Thursday, 7 May 2015 at 20:28:27 UTC, Orfeo wrote:
> On Thursday, 23 April 2015 at 14:40:01 UTC, Frank Pagliughi wrote:
>> I got the OK to submit the D library to Eclipse Paho. So, hopefully within the next few weeks there will be a Paho incubator project for the D language client.
> Hi Frank,
> any news about your MQTT client project?
>
> Thank you

I needed it too so - http://forum.dlang.org/thread/isznbdlzfyvprkenakng@forum.dlang.org

Hope it helps and gets better with shared efforts