Re: [Mosquitto-users] Getting the client ID of messages received

2012-07-25 Thread Roger Light
Hi Damiano, This isn't a limitation of the library, it is the design of the protocol. There is no built in way to determine which client is sent a message. You could use a specific topic or include information in your payload if this is important to you. Cheers, Roger -- Mailing list: https://l

Re: [Mosquitto-users] Mosquitto and MySQL

2012-07-26 Thread Roger Light
Hi Stefano, > Two different approaches: > - modify the broker so that it saves messages directly to MySQL instead of > the present way (flat file? SQLite? What's today??) PRO: best integration > CON: difficult to be maintained and configured At the moment the broker only keeps retained messages w

Re: [Mosquitto-users] mosquitto_sub and clean session flag disable

2012-07-27 Thread Roger Light
Hi Stefano, > I know I'm missing something. I'm trying to use the "no clean session" > feature: > On one terminal: > > stefanoco@stefanocopc:~$ mosquitto_sub -c -i "6748" -v -t "diag/#" ... > stefanoco@stefanocopc:~$ mosquitto_pub -i "7748" -q 1 -t "diag/par01" -m ... > Everything ok. Now, ha

Re: [Mosquitto-users] mosquitto_sub and clean session flag disable

2012-07-27 Thread Roger Light
Hi Nagesh, > I think, you are referring to retain flag. > > When you are connecting with clean session flag, then your subscriptions are > retained. But, if you want the messages in the interim of disconnection > (btw, you would get only the latest message), you need to publish with > retain flag.

Re: [Mosquitto-users] Getting the client ID of messages received

2012-07-27 Thread Roger Light
Hi Damiano, > Indeed, if I understand correctly the protocol definition, it says that > PUBLISH messages don't contain this client ID field -- and that's this kind > of messages that are forwarded to MQTT "consumers". > > Now, my question is: doesn't that somewhat contradict with the common use >

Re: [Mosquitto-users] Getting the client ID of messages received

2012-07-27 Thread Roger Light
Hi Damiano, >> > Maybe a workaround would be to have a modified broker which would alter >> > the >> > payload of PUBLISH messages before forwarding them. And that would have >> > to >> > be done inside the broker as the information is only known to it. >> >> You could of course do this, but it wo

Re: [Mosquitto-users] Getting the client ID of messages received

2012-07-27 Thread Roger Light
Hi, >> Suppose, you are monitoring the soil pH of various potted plants. The >> monitoring device has a client ID based on the potted plant which you would >> have designated in your own convenient way. That convenient way would also >> ensure some uniqueness just as you were taking readings off a

Re: [Mosquitto-users] Bridging issues

2012-07-31 Thread Roger Light
Hi Michael, > First issue is if I use a username/password for the bridge. I see that the > slave connects, connects to the three topics that I want it listening to, > and then a socket error. > > Slave output: ... > 1343748661: Received PUBREC from > test-us-east-mqtt-40e9eb38.swypeconnect.com.

Re: [Mosquitto-users] Bug in pthreadvc2.dell

2012-08-17 Thread Roger Light
Hi Josh, Thanks for the report. > I have installed mosquito (1.0.1 cygwin) on 2 machines, one is Windows XP > the other is Windows 7. ... > P4: pthreadVC2.dll Someone else has had a similar problem on Linux. It was completely reproducible for them so we managed to figure out a fix. I've got an

Re: [Mosquitto-users] Delay PUBACK in mosquitto_sub.

2012-08-20 Thread Roger Light
Hi Nagesh, You can't do this with the mosquitto clients, but take a look in the test/client directory for some python code that deliberately breaks the message timeouts. Cheers, Roger On Sun, Aug 19, 2012 at 7:49 AM, ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S) wrote: > Hi, > I am exploring QoS=1 behavior.

Re: [Mosquitto-users] MQTTs

2012-09-11 Thread Roger Light
Hi Stefano, It's not something I'm working on right now, but mqtt-s support is something I'm planning for mosquitto 1.1 or 1.2. It depends on another plan, which is to add an "in broker client" plugin interface. The idea is to be able to support things like bridging and mqtt-s as plugins and to al

Re: [Mosquitto-users] Retained messages

2012-09-18 Thread Roger Light
Hi Stefano, The retained flag has different meanings depending on whether a message is going from the client to the broker or broker to client. For a message from the client to the broker, if the retained flag is set the client is telling the broker that this message should be retained as the last

Re: [Mosquitto-users] Mosquitto - Forcefully disconnecting clients on demand

2012-09-18 Thread Roger Light
Hi Saurabh, I'm afraid that there aren't currently any admin commands you can send to the broker, but this sort of remote control feature is on the list for a future version. You can force clients to disconnect by connecting a new client that has the same client id as the one you wish to disconnec

Re: [Mosquitto-users] Mosquitto+Python+MySQL+APNS

2012-09-18 Thread Roger Light
Hi Yun, > 1. what's the best practice to connect Mosquitto broker with the MySQL to > make sure: all messages are stored in the database? Ideally, all message > sent to server should be stored in the db before they are distributed, to > ensure the data security. At the moment you have to write an

Re: [Mosquitto-users] Mosquitto+Python+MySQL+APNS

2012-09-18 Thread Roger Light
Hi, >> 3. for the iPhone wrapper of the mosquitto client, I checked Marquette , is >> this wrapper compatible with the latest version of Mosquitto 1.0.2 > > From what I can see, the last commit to Marquette was 8 months ago, so > unfortunately no it isn't compatible with 1.0.2. I'm sure that Nick

Re: [Mosquitto-users] Mosquitto+Python+MySQL+APNS

2012-09-18 Thread Roger Light
Hi Yun, Yes, you're correct but with one additional point. Your special client isn't just for saving messages to the database, it's for the server side application processing - i.e. turning it into a chat application rather than simply clients connected to an MQTT broker. It would also be doing th

Re: [Mosquitto-users] Details about Mosquitto PPA

2012-09-19 Thread Roger Light
Hi Stefano, Thanks, that's a good suggestion. I've updated the page. Cheers, Roger On Wed, Sep 19, 2012 at 3:31 PM, stefano costa wrote: > Hello, > not sure if this is the right way of reporting this... but I found that the > description about how to install Mosquitto on Ubuntu (a rather freq

Re: [Mosquitto-users] Wildcard and retained messages

2012-09-20 Thread Roger Light
Hi Stefano, That's definitely a bug. I think the first publish to /sensor/001 should match with a subscription of # (so the second mosquitto_sub is correct) but I'd have to check. Cheers, Roger On Thu, Sep 20, 2012 at 2:39 PM, stefano costa wrote: > Hello, I'm not sure if this is a bug or int

[Mosquitto-users] Version 1.0.3

2012-09-27 Thread Roger Light
Hi, I've just released mosquitto version 1.0.3 which has a few bugfixes. http://mosquitto.org/2012/09/version-1-0-3-released/ Cheers, Roger -- Mailing list: https://launchpad.net/~mosquitto-users Post to : mosquitto-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~mosquitto-

Re: [Mosquitto-users] phpMQTT & mosquitto

2012-10-09 Thread Roger Light
Hi Wayne, Have you got an example script you could share to make testing this straightforward? I've not used phpMQTT myself. Cheers, Roger On Tue, Oct 9, 2012 at 12:55 PM, Wayne Ingram wrote: > Hi All, > > Is anyone using phpMQTT with a recent version of Mosquitto? I'm getting > errors using t

Re: [Mosquitto-users] How to monitor Client ID in broker

2012-10-10 Thread Roger Light
Hi Andy, Andy is right, there's no way to do this in mosquitto specifically. If you really need to do this, you can recreate it using client behaviour: http://mqtt.org/wiki/doku.php/presence Cheers, Roger On Wed, Oct 10, 2012 at 12:34 PM, andypipe...@gmail.com wrote: > Hi Andy > > Curious why

Re: [Mosquitto-users] phpMQTT & mosquitto

2012-10-10 Thread Roger Light
as > mosquitto. > > Wayne. > > > > On Wed, Oct 10, 2012 at 12:02 AM, Roger Light wrote: >> >> Hi Wayne, >> >> Have you got an example script you could share to make testing this >> straightforward? I've not used phpMQTT myself. >

Re: [Mosquitto-users] libmosquitto fails on Windows XP

2012-10-14 Thread Roger Light
Hi Zvi, I haven't seen that myself, but from some searching for that error it's possible it's to do with missing Visual C redistributables. I'd suggest finding the Visual Studio 10 redistributable package and installing it on the machines you have problems with. There is a bug fixed in 1.0.3 that

Re: [Mosquitto-users] Removing a retained message from the broker

2012-10-21 Thread Roger Light
Hi Nicolas, You can remove retained messages by publishing a zero length retained message to the topic you wish to clear. For example, you could do it with mosquitto_pub as follows: mosquitto_pub -t -r -n Cheers, Roger -- Mailing list: https://launchpad.net/~mosquitto-users Post to : mos

Re: [Mosquitto-users] SSL connection from Java client to mosquitto broker: "no certificate returned"

2012-10-21 Thread Roger Light
Dear Sharon, > By the way, after tweaking kernel params, I was able to open 100K concurrent > clients to one broker instance on a medium sized EC2 machine. Good work, > mosquitto! That's great to hear! Thanks for letting me know. > Now I am trying to set up a secured connection using SSL. I wa

Re: [Mosquitto-users] SSL connection from Java client to mosquitto broker: "no certificate returned"

2012-10-22 Thread Roger Light
Hi Sharon, > The mosquito process is gone ! You've discovered a hole in my tests! This crash is down to mosquitto assuming that clients do actually pass a certificate when use_identity_as_username is set to true and that isn't necessarily the case. I've pushed a fix in this changeset: https://bit

Re: [Mosquitto-users] SSL connection from Java client to mosquitto broker: "no certificate returned"

2012-10-23 Thread Roger Light
Hi Sharon, > 3) Invoked > mosquitto_sub -v -p 1883 --cafile etc/ca.crt --cert etc/client.crt --key > etc/client.key -t \$SYS/# > at the prompt, entered PEM passphrase > got " Error: Protocol error" and server produced > OpenSSL Error: error:140890B2:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:no >

Re: [Mosquitto-users] SSL connection from Java client to mosquitto broker: "no certificate returned"

2012-10-24 Thread Roger Light
Hi Sharon, > Run my client Java program with the client certs from the test/ssl directory > - successfully! > At last I know my code works correctly! > Would like me to post it somewhere for posterity? By all means - I'm sure the Paho guys would be pleased to have it as an example of how to use

Re: [Mosquitto-users] SSL connection from Java client to mosquitto broker: "no certificate returned"

2012-10-25 Thread Roger Light
Hi Sharon, Great news, I'm glad it's sorted. I'll be releasing 1.0.5 with your bug fix in a week, assuming no other bugs pop up in the meantime. Cheers, Roger -- Mailing list: https://launchpad.net/~mosquitto-users Post to : mosquitto-users@lists.launchpad.net Unsubscribe : https://launchp

[Mosquitto-users] Version 1.0.5 released

2012-11-03 Thread Roger Light
Hi all, I've just released version 1.0.5: http://mosquitto.org/2012/11/version-1-0-5-released/ Cheers, Roger -- Mailing list: https://launchpad.net/~mosquitto-users Post to : mosquitto-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~mosquitto-users More help : https://help.

Re: [Mosquitto-users] Version 1.0.5 released

2012-11-03 Thread Roger Light
> I noticed the package at homebrew is still 1.0.2. will it be updated soon? > :) I'm afraid I don't have access to a Mac, so it's not something I feel happy doing it. Hopefully someone with a Mac can be persuaded to test the new version and make a pull request for the updated package. Cheers,

Re: [Mosquitto-users] Version 1.0.5 released

2012-11-03 Thread Roger Light
Thanks Andy. Cheers, Roger On Sat, Nov 3, 2012 at 10:42 PM, Andy Piper wrote: > This is usually something I do. I'll get around to updating shortly. > > from mobile > > On 3 Nov 2012, at 20:24, Roger Light wrote: > > >> I noticed the package at homebrew is

Re: [Mosquitto-users] Version 1.0.5 released

2012-11-05 Thread Roger Light
On Mon, Nov 5, 2012 at 2:56 PM, andypipe...@gmail.com wrote: > The homebrew version is now 1.0.5 per pull request: > https://github.com/mxcl/homebrew/pull/15867 Thanks Andy. > ... now let's get Raspbian, OpenWRT and others updated :-) I think that's easier said than done unfortunately! I don't

Re: [Mosquitto-users] Scaling and HA strategies

2012-11-10 Thread Roger Light
Hi Thomas, > I imagine that for all the MQTT based services, we have a 3 "actors" setup > -Client: the Client level, ie mobile phones here, handled by an MQTT client > library > -Broker: Clients talk with MQTT brokers > -Server Application: A server app that is listening to MQTT topics and > pos

Re: [Mosquitto-users] Scaling and HA strategies

2012-11-12 Thread Roger Light
Hi Thomas, > By any chance do you have any numbers for max connections on a broker > (on a given machine) ? Latency to dispatch a message given a number of > subscribers? I'm afraid not. All I have is reports like: https://lists.launchpad.net/mosquitto-users/msg00064.html I don't know the circums

Re: [Mosquitto-users] Build up a MQTT server with about 20, 000+ subscribers

2012-11-12 Thread Roger Light
Hi Joe, > Our project need to setup and Android push notification service. I noticed > many of projects are using MQTT protocol and I found this mosquitto. Yes, MQTT can be a good fit for push notification. I saw in your previous email you mentioned the tokudu demo. Please just be aware that the

Re: [Mosquitto-users] Build up a MQTT server with about 20, 000+ subscribers

2012-11-13 Thread Roger Light
On Tue, Nov 13, 2012 at 12:54 PM, Joe Zhu wrote: > Look like payload only work for client lost connection. But doesn't for > client connect. > mosquitto_sub only have the --will-topic and --will-payload. It means > "client/+" couldn't get any payload for client connected. Is it right? That's c

Re: [Mosquitto-users] Build up a MQTT server with about 20, 000+ subscribers

2012-11-14 Thread Roger Light
Hi Mike, > -There’s not much special, EC2 mediums can do 200k+ (yes, two > hundred) with QoS 2, SSL off, and a moderate number of messages publishing > constantly. Can you offer any further details on what "moderate" means here? Just a rough order of magnitude would be nice to know. > Sh

Re: [Mosquitto-users] Running the Mosquitto server on iOS

2012-11-18 Thread Roger Light
Hi Matt, > I wanted to see how much effort would > be involved in getting the Mosquitto broker running on iOS. I'd expect that it wouldn't be *too* much bother. There's a lot of shared code with libmosquitto and it runs fine on iOS. I'd probably check the config.mk file and disable all of the opt

Re: [Mosquitto-users] Build up a MQTT server with about 20, 000+ subscribers

2012-11-21 Thread Roger Light
Hi Mike, > Sharon, the problem that I can already tell you that will arise with SSL is > memory usage. I forget the exact numbers but calling the consumption > noticeable would be an understatement. Openssl >=1.0 allows SSL compression to be disabled which reputedly saves significant amounts of

[Mosquitto-users] SSL memory usage

2012-11-26 Thread Roger Light
Hi, I've just done some crude testing with massif (the valgrind heap profiling tool) and mosquitto in various configurations. I'm connecting 1000 mosquitto_sub clients, all subscribing to $SYS/#. I'm not controlling any timing of when things happen, so there will be some small differences across t

Re: [Mosquitto-users] Sending reload signals from java

2012-12-04 Thread Roger Light
Hi, On Tue, Dec 4, 2012 at 8:00 AM, saurabh patil wrote: > I do have PID for the mosquitto but the problem is, on Linux I can use kill > command to send SIGHUP signal to mosquitto but I am not getting any way to > make it on Windows. I want to do this on Windows without restarting > mosquitto.

Re: [Mosquitto-users] Mosquitto Dump

2012-12-06 Thread Roger Light
Hi Saurabh, Could you give some more details that might help us understand what might be happening? What version of Windows are you using? Are you using a configuration file and if so, what settings have you used? What version of mosquitto are you running? Anything you can provide would be useful

Re: [Mosquitto-users] broker detection

2012-12-09 Thread Roger Light
Hi, On Sat, Dec 8, 2012 at 10:41 PM, Matthew Smollinger wrote: > You could implement something like Bonjour discovery ... > Mosquitto doesn't support this type of discovery anyway to the best of > my knowledge. As Matt says, mosquitto doesn't support this directly at the moment. I've got a bra

Re: [Mosquitto-users] using libmosquitto in an external event loop

2012-12-13 Thread Roger Light
Hi Bart, Would the lua equivalent of this do what you want? rc = mosquitto_loop_read(mosq); if(rc == MOSQ_ERR_CONN_LOST){ /* We've been disconnected from the server */ mosquitto_reconnect(mosq); do_something_with_socket(mosquitto_socket(mosq)); } Apologies for the brief reply, I'm ju

Re: [Mosquitto-users] Sending reload signals from java

2012-12-15 Thread Roger Light
Hi Prashant, > I am also having the same issue on windows and I was wondering if I can > initiate a monitor on mosquitto configuration file directory, through this > plugin (using windows FindFirstChangeNotification ), so that whenever any of > the configuration file changes, monitor will capture

Re: [Mosquitto-users] Implementing mosquitto plugin

2012-12-15 Thread Roger Light
Hi Prashant, There is a ridiculously simple example in the test/broker/c/auth_plugin.c file. It at least shows the full set of functions as described in mosquitto_plugin.h. You should compile it as a simple dll on Windows using Visual Studio or whatever other compiler you would use. The makefile i

Re: [Mosquitto-users] Python-based example not working any more

2012-12-19 Thread Roger Light
Hi Stefano, > https://github.com/knolleary/twitter-to-mqtt I just headed over there to check it out and saw that Nick has already pushed an update. The code above was for use with 0.15 - the api changed a bit for 1.0. If you pull the new version hopefully it should work fine now. Cheers, Roger

[Mosquitto-users] Version 1.1 released

2012-12-20 Thread Roger Light
Dear all, I released version 1.1 yesterday (Happy Christmas!) Details are on the main site: http://mosquitto.org/2012/12/version-1-1-released/ Cheers, Roger -- Mailing list: https://launchpad.net/~mosquitto-users Post to : mosquitto-users@lists.launchpad.net Unsubscribe : https://launchpad

Re: [Mosquitto-users] Problem in log_type debug with log_dest topic

2012-12-24 Thread Roger Light
Hi Prashant, > If I am right, that debug level logging is not allowed with dest_type topic, > can anyone tell me what is the significance of this restriction? You are correct, debug messages are not sent over the topic log type. The docs have it slightly incorrect, so I've just fixed them. There

Re: [Mosquitto-users] Mosquitto Client state

2012-12-31 Thread Roger Light
Hi Josh, There is no direct way of telling what clients are connected from the broker, but you can do it from the client. The disconnects messages can be provided by the "last will and testament" feature as described here: http://mqtt.org/wiki/doku.php/presence Cheers, Roger On Mon, Dec 31, 201

Re: [Mosquitto-users] libmosquitto on Android

2013-01-03 Thread Roger Light
Hi Sharon, I didn't receive any more information from the person who filed the bug report, which is a shame. I did go and look into it myself a few months back, but only got as far as the blurb: "Before downloading the NDK, you should understand that the NDK will not benefit most apps. As a devel

Re: [Mosquitto-users] mosquitto_pub with SSL: can I provide PEM pass phrase

2013-01-03 Thread Roger Light
Hi Sharon, > I am trying to invoke mosquitto_pub with SSL. I provide all the necessary > certificates and the call is successful. > However, the program prompts me to get PEM pass phrase. I would like to > provide that info in an argument or > some other way that is not interactive. It's not

Re: [Mosquitto-users] libmosquitto on Android

2013-01-03 Thread Roger Light
Hi Sharon, I took another look at this tonight and have committed a change that at least allows libmosquitto to be compiled using the Android NDK: https://bitbucket.org/oojah/mosquitto/commits/2c12fd25742332574736c85df94e83b8 I don't know what else would be needed to get an app working though. Ch

[Mosquitto-users] Debian repository for mosquitto

2013-01-10 Thread Roger Light
Hi, I've created a debian repository for mosquitto, including i386, amd64 and raspberry pi packages. More details here: http://mosquitto.org/2013/01/mosquitto-debian-repository/ Cheers, Roger -- Mailing list: https://launchpad.net/~mosquitto-users Post to : mosquitto-users@lists.launchpad.

Re: [Mosquitto-users] Mosquitto on BeagleBoard with Angstrom Linux

2013-01-28 Thread Roger Light
Hi Zvi, I've not done this myself nor heard of anybody doing it. The closest thing I know about is probably compiling on small devices using openwrt. Cheers, Roger On Thu, Jan 24, 2013 at 12:51 PM, Zvi Avraham wrote: > Hi, > > anybody was able to compile / install mosquitto on BeagleBoard wit

Re: [Mosquitto-users] python daemon - on_message callback not fired

2013-02-04 Thread Roger Light
Dear Alexander, > My problem is that on_message will not get hit. You aren't calling the network processing loop anywhere so only outgoing communication will happen. You should use loop() periodically, loop_start() once to run the network loop in a thread in the background, or loop_forever() to c

Re: [Mosquitto-users] python daemon - on_message callback not fired

2013-02-05 Thread Roger Light
It looks like this is an interaction with daemon.runner. I don't know what is causing it yet, but the modified example below works fine. Cheers, Roger #!/usr/bin/python import mosquitto import config import time class Client(): def __init__(self): self.mc = None print('Clas

Re: [Mosquitto-users] unicode strings

2013-02-11 Thread Roger Light
Hi, I'm not near a computer right now, but can you tell me what version of python you are using and how you are creating the string? Thanks, Roger On Feb 11, 2013 6:48 PM, "Alexander Bolotnov" wrote: > While trying to send unicode strings to mosquitto with python client I get > the following:

Re: [Mosquitto-users] unicode strings

2013-02-11 Thread Roger Light
Hi > I'm now using a dirty walkaround: > > def send_message(self, topic, message): > if type(message) == unicode: > message = str(message).encode('string_escape') > result, some_number = Client.mc.publish(topic, message) mosquitto.py does actually support p

Re: [Mosquitto-users] unicode strings

2013-02-11 Thread Roger Light
ad, bytearray) == > True: > local_payload = payload > > should actually be something like > > if payload and type(payload) in (str, unicode, bytearray): > local_payload = payload > > I guess > thanks, > > > > Sasha Bolotnov > www.bolotnov.info > > > &

Re: [Mosquitto-users] Best practices for tls_set in Python

2013-02-11 Thread Roger Light
Hi Jack, I've got a part written reply to you that I've not yet sent because I'm not happy with it. Sorry about that, I'll try and sort it out as soon as I can. Cheers, Roger On Mon, Feb 11, 2013 at 10:04 PM, Jack O'Connor wrote: > Thanks for the reply, and I meant to follow up sooner. Does th

Re: [Mosquitto-users] Exception thrown from loop() when ssl enabled and network missing

2013-02-21 Thread Roger Light
Hi Jack, Thanks for the message, I agree that it looks like you've found some problems. It's been a bit busy here and I've not been getting much sleep so I've not looked at it properly yet, but I just wanted to make sure you didn't think I was ignoring you. Thanks, Roger On Sun, Feb 17, 2013 at

Re: [Mosquitto-users] Exception thrown from loop() when ssl enabled and network missing

2013-02-23 Thread Roger Light
Hi Jack, Have you got an example program that reproduces this problem? I've managed to get a similar error but wondered how you were doing it. Cheers, Roger On Sun, Feb 17, 2013 at 7:38 PM, Jack O'Connor wrote: > Traceback (most recent call last): > File "/usr/lib/python3.2/threading.py", li

Re: [Mosquitto-users] Exception thrown from loop() when ssl enabled and network missing

2013-02-25 Thread Roger Light
Hi Jack, Thanks for that, very helpful. I've made some changes that re-raise the unhandled exceptions here: https://bitbucket.org/oojah/mosquitto/commits/7e367780e1e52dc24a38617ddf49b2f82302d9a4 This isn't really a full solution but it does at least mean that the exceptions that are raised are mu

Re: [Mosquitto-users] Topic-per-device style model using Mosquito

2013-02-26 Thread Roger Light
Hi Sharon, > The controller will subscribe to the $SYS topics and will monitor the load > of each broker and will scale up new instances if required. Is the data provided in $SYS adequate for your needs? Cheers, Roger -- Mailing list: https://launchpad.net/~mosquitto-users Post to : mosqu

Re: [Mosquitto-users] Retained messages

2013-02-27 Thread Roger Light
Hi Eurig, I used this code to try and duplicate your result: https://gist.github.com/oojah/5047905 It works ok for me - can you see where the difference lies with what you are doing? Cheers, Roger On Wed, Feb 27, 2013 at 12:31 PM, Eurig Jones wrote: > I have: > > A publisher client (X) which

Re: [Mosquitto-users] Payload support Unicode/UTF-8? (mosquitto Python client)

2013-03-17 Thread Roger Light
Hi Horace, Is there any chance you could post a non-working demo? I've just put together an example that works: https://gist.github.com/oojah/5182443 Could you give that a try as well? It would be good to know where things are going wrong. Regards, Roger -- Mailing list: https://launchpad.net/

Re: [Mosquitto-users] Payload support Unicode/UTF-8? (mosquitto Python client)

2013-03-18 Thread Roger Light
t;msg.payload){ > _mosquitto_message_cleanup(&message); > return MOSQ_ERR_NOMEM; > } > memcpy(message->msg.payload, payload, payloadlen*sizeof(uint8_t)); > }else{ > message->msg.payloadlen = 0; > message->msg.payload = NULL; > } > message->msg.qos = qos; > me

Re: [Mosquitto-users] Payload support Unicode/UTF-8? (mosquitto Python client)

2013-03-18 Thread Roger Light
Hi Horace, > For others who might use this wrapper to send non-ASCII message, also pushed > this to github branch: > https://github.com/horacex/marquette > also updated the pull request to original repo. That's great news! Thanks for pushing the fix back to Nick as well. Cheers, Roger -- Mail

Re: [Mosquitto-users] Existing connections are getting lost on config file reload (signal SIGHUP)

2013-04-09 Thread Roger Light
Hi Saurabh, I'm afraid I don't see this behaviour. Could you tell me what OS you are running on? Could you also repeat it with two clients connected and check whether they are both affected? Cheers, Roger On Tue, Apr 9, 2013 at 11:34 AM, saurabh patil wrote: > Hi Roger, > > Mosquitto documen

Re: [Mosquitto-users] Existing connections are getting lost on config file reload (signal SIGHUP)

2013-04-11 Thread Roger Light
file.txt >> >> 5) I could not reproduce the issue with no password file for >> authentication. >> >> Test Environment: >> mosquitto version: 1.0.5 (build date 2012-11-03 12:29:20+) >> Platform: Linux 3.5.0-17-generic #28-Ubuntu GNU/Linux >> >>

Re: [Mosquitto-users] Existing connections are getting lost on config file reload (signal SIGHUP)

2013-04-11 Thread Roger Light
> > With Regards, > Saurabh Patil. > > > On Thu, Apr 11, 2013 at 10:05 PM, Prashant Kedia < > prashantkedi...@gmail.com> wrote: > >> Thanks Roger, >> >> Cheers, >> Prashant >> >> >> On Thu, Apr 11, 2013 at 8:49 PM, Roger Light wr

Re: [Mosquitto-users] compiling auth plugin

2013-04-12 Thread Roger Light
On Fri, Apr 12, 2013 at 3:57 PM, Artjom wrote: > Argh, instead of linking the final binary against hiredis I was doing it > with the plugin. All works now. Thanks a lot! It looks like this should be fixed by using "-rdynamic" in the options for the final link stage when compiling mosquitto. I'll

Re: [Mosquitto-users] (no subject)

2013-04-18 Thread Roger Light
Hi Patrick, You can remove retained messages by publishing a zero length retained message to the same topic. So if you were using mosquitto_pub, you could set a retained message like this: mosquitto_pub -t my/topic -m message -r And to clear it: mosquitto_pub -t my/topic -r -n I don't think t

Re: [Mosquitto-users] Sending large messages to individually adressed devices

2013-04-18 Thread Roger Light
Hi Niclas, The MQTT protocol provides for a maximum message payload size of 268,435,455 bytes which is more than sufficient for the size of data you are talking about. There is no reason to think what you're suggesting wouldn't work with mosquitto. Cheers, Roger On Tue, Apr 16, 2013 at 11:05 PM

Re: [Mosquitto-users] problem running mosquitto_pub in XPMode

2013-04-23 Thread Roger Light
Hi Roland, It sounds like you need a more up to date VC++ run time, although I'm surprised that it complained about MSCVR90.dll in that case. I would expect MSVCR100.dll to be the required run time. Is it possible that there is a 64/32 bit mismatch in dll somewhere? Cheers, Roger On Mon, Apr 22

Re: [Mosquitto-users] I think mosquitto python library 1.1.3 on Python 2.7 doesn't work with username/pwd

2013-05-06 Thread Roger Light
Hi Zvi, I hate to ask, but are you sure you have the username correct? > self.client.username_pw_set('uername', 'password') The username and password code is tested for all client libraries in the same manner, so I'm quite confident that it is ok. The relevant test here is test/lib/01-un

Re: [Mosquitto-users] Always received publish message even I restarted the server

2013-05-09 Thread Roger Light
Hi Neo, As you've already figured out, the most likely cause for what you're seeing is that there is a retained message set. It could also be down to having a client with clean-session set false, but that would more likely result in you getting a lot of messages at once when you reconnected. "mos

Re: [Mosquitto-users] How many concurent connection?

2013-05-11 Thread Roger Light
Hi Neo, Upstart sets its own limits, so if you are using it to start mosquitto you will need to modify /etc/init/mosquitto.conf: limit nofile 262144 262144 On May 11, 2013 6:18 AM, "Neo Qing" wrote: > Hi,There: > When I investigate on mosquitto, the first question comes to my mind is, > how m

Re: [Mosquitto-users] How many concurent connection?

2013-05-11 Thread Roger Light
Sent this too soon, that line will match the values in the link. Cheers, Roger On May 11, 2013 10:09 PM, "Roger Light" wrote: > Hi Neo, > > Upstart sets its own limits, so if you are using it to start mosquitto you > will need to modify /etc/init/mosquitto.conf: > >

Re: [Mosquitto-users] Assert within bridged mosquitto (called MClient) -> Mosquitto (called MServer) fails when the server brought down and up again

2013-05-15 Thread Roger Light
Hi Paul, Please do file a bug report. I'm trying to work out the problem now but it's good to have a way of keeping track. Cheers, Roger On Wed, May 15, 2013 at 9:04 PM, Paul-Armand Verhaegen wrote: > Thanks for the fast response Karl. I changed the bridge type to automatic, > and that works g

Re: [Mosquitto-users] How to avoid loopback publish

2013-05-21 Thread Roger Light
Hi Fabio, You can set the most significant bit of the protocol version number to a 1 to indicate to the broker that you are a bridge. This prevents your own messages being returned to you and also means that the message retained status is propagated to you. However, I would suggest that you recon

Re: [Mosquitto-users] Broker subscriptions lost

2013-05-29 Thread Roger Light
Hi Marco, Sorry to hear you're having problems. Could you provide a few more details of what you are running and what you are seeing? In particular, if you could say what version of mosquitto you are using and what clients you are using it would be a good starting point. Regards, Roger On Wed,

Re: [Mosquitto-users] pub / sub binding to specific address or interface

2013-05-31 Thread Roger Light
Hi Stefano, This isn't supported currently, but consider it on the list for version 1.2. Cheers, Roger On Fri, May 31, 2013 at 9:34 AM, Stefano Costa wrote: > Hello, > the Mosquitto broker is able to bind to any specific address (and interface > as a consequence) by configuration file. > > I

Re: [Mosquitto-users] pub / sub binding to specific address or interface

2013-05-31 Thread Roger Light
Hi Stefano, Consider it done: https://bitbucket.org/oojah/mosquitto/commits/db5147ce80f1b612986bca0778e201f94532de5e Cheers, Roger On Fri, May 31, 2013 at 10:20 AM, Roger Light wrote: > Hi Stefano, > > This isn't supported currently, but consider it on the list for version 1

Re: [Mosquitto-users] Wild card

2013-06-03 Thread Roger Light
Hi Stefano, The behaviour you describe is incorrect. It is better explained using a longer topic - let's set sensors/temperature sensors/humidity etc. A subscription to sensors/# would match on sensors/temperature, sensors/humidity *and* sensors. If we imagine that a subscription to /# is actuall

Re: [Mosquitto-users] Wild card

2013-06-05 Thread Roger Light
On Mon, Jun 3, 2013 at 12:08 PM, Roger Light wrote: > The current mosquitto code (you really should upgrade) works correctly > for subscriptions to # but not for retained messages when subscribing > to /# (it returns messages with topics without a leading slash). I'll > get

Re: [Mosquitto-users] Best practices for tls_set in Python

2013-06-12 Thread Roger Light
Hi Jack, Thanks for the reminder that I'd not replied to this. You can of course use the certificates that come with your OS and as Alexander says they are located in /etc/ssl/certs. You can use the "capath" option rather than "cafile" to load them. Bear in mind that there may be no need for you

Re: [Mosquitto-users] SYS statistics

2013-07-18 Thread Roger Light
Hi Stefano, One thing to be aware of is that "messages" here is all MQTT command messages, not just the PUBLISH messages. It is possible that is skewing your results. You could look at $SYS/broker/publish/messages/# instead. You can see this clearly on test.mosquitto.org: $SYS/broker/messages/re

Re: [Mosquitto-users] Compiling mosquitto-eclipse paho on BeagleBone

2013-07-25 Thread Roger Light
Hi Bharath, You would be better off asking this question on the eclipse paho mailing list. If/when you do so, it would be worth providing some details of the problem you're seeing and describing what you have already tried when attempting to fix the problem. Cheers Roger On Wed, Jul 24, 2013

Re: [Mosquitto-users] Windows Service: Can't find password file

2013-08-01 Thread Roger Light
Hi Steve, I can't look at this until later, but I'd suggest using a complete path rather than using %APPDATA% for now. I'll see about fixing it so that the path can contain an environment variable for version 1.2, which should be available any day now. Cheers, Roger On Wed, Jul 31, 2013 at 7:3

Re: [Mosquitto-users] Listener / mount points bound to auth user

2013-08-06 Thread Roger Light
Hi Stefano, It's an interesting idea, feel free to submit it as a bug report. You can already achieve it to a limited degree by using a mount point on a listener that doesn't allow anonymous connections. Cheers, Roger On Mon, Aug 5, 2013 at 4:43 PM, Stefano Costa wrote: > I think that an opti

Re: [Mosquitto-users] How to persist message in mosquitto

2013-08-06 Thread Roger Light
Hi, I would expect that you don't have permission to write to C: Try running it without setting persistence_location and from a directory where you have write permission. Cheers, Roger On Fri, Aug 2, 2013 at 7:48 AM, 灰(Grey)狼 <86267...@qq.com> wrote: > I am newbie in mosquitto , I installed

Re: [Mosquitto-users] SSL: Endlessly Enter PEM pass phrase prompt

2013-08-12 Thread Roger Light
Hi Steve, It sounds like the connection is failing at some point and then attempting to reconnect, which is what is triggering the pass phrase request. The mosquitto pub/sub utilities only offer keyboard entry of pass phrases. It would be fairly straightforward to add your own method to obtain the

Re: [Mosquitto-users] SSL: Endlessly Enter PEM pass phrase prompt

2013-08-12 Thread Roger Light
t; I guess the protocol doesn't like that. I had to vary the Common Name and > the Challenge Passphrase for each key:cert pair I made. After that it all > went well (including using passwords). > > Thanks, > Steve > > > On Mon, Aug 12, 2013 at 9:09 AM, Roger Light wr

Re: [Mosquitto-users] SSL: Endlessly Enter PEM pass phrase prompt

2013-08-13 Thread Roger Light
​Hi Steve, So it is. Slight teething problem after moving host/webserver. It should be fine now. Thanks, Roger -- Mailing list: https://launchpad.net/~mosquitto-users Post to : mosquitto-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~mosquitto-users More help : https://hel

Re: [Mosquitto-users] Mosquitto SSL with a CA Certificates Chain and Fedora Segfault

2013-08-22 Thread Roger Light
Hi Duncan, Thanks for the detailed email. First off, I can say that this should work. The broker and client library tests for SSL use a root->intermediate->server/client chain for signing. I suppose that's a good place to start - if you download the 1.2 tarball and run "make test" in the extracted

Re: [Mosquitto-users] bridging 2 remote offices to a central office and having the same topic on all three

2013-08-28 Thread Roger Light
Hi Amyas, This should work fine, assuming the overall message rate isn't too high. You could either configure the central office to bridge out to the remote offices, or have the remote offices bridge into the central. This should do it: connect remote1-to-central address topic /sendmsg/alldesk

Re: [Mosquitto-users] Problem with --disable-clean-session flag use

2013-09-01 Thread Roger Light
Hi Paul, You need to subscribe with QoS>0 as well, I imagine that's the problem. I did this: mosquitto_sub -c --id myid1 -h test.mosquitto.org -t sensors/value -q 1 mosquitto_pub -h test.mosquitto.org -t sensors/value -q 1 -m 6 mosquitto_sub -c --id myid1 -h test.mosquitto.org -t sensors/value

  1   2   >