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 this is the best way for you to approach your problem
though. Using "clean session"=false with your client means that the
broker keeps subscriptions for your client even when it disconnects.
If your subscriptions and incoming messages have QoS>0 (or you are
using the non-standard queue_qos0_messages option with QoS=0 subs and
messages) then messages that are received for your client will be
queued up until it reconnects. The advantage here is that you get all
of the messages (up to the max_queued_messages limit) whereas using
retained messages only gets the most recent message.

I hope that helps.

Cheers,

Roger


On Tue, Apr 16, 2013 at 7:47 PM, Nelsen, Patrick
 wrote:
> Hi all,
>
> I'm using MQTT with several embedded devices that will frequently post to a
> mosquito broker every 15 minutes.  In addition, I have an MQTT client that
> is gathering data and placing it in a database.  When running a long test, I
> noticed that my database client dropped its connection with the broker
> briefly and messages were missed because my devices were not publishing with
> the retain bit set.  In order to prevent this type of "data loss" (when a
> client is not currently subscribed), I figured that I could set the retain
> bit to 1.  However, when I do this my mosquito broker becomes saturated with
> messages and each time I drop connection I receive all of the previously
> published data.  Is there a way to tell the mosquito broker that it can
> remove its persisted entries?
>
>
>
> Patrick
>
>
>
>
>
>
> --
> Mailing list: https://launchpad.net/~mosquitto-users
> Post to : mosquitto-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~mosquitto-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
Mailing list: https://launchpad.net/~mosquitto-users
Post to : mosquitto-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mosquitto-users
More help   : https://help.launchpad.net/ListHelp


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, Niclas Karlsson  wrote:
> Hi guys,
>
> I'm evaluating MQTT and the Mosquitto broker for a system that should
> collect sensor data from a number of embedded devices. The embedded devices
> is running Linux and is sending about 40 sensor values about every 30
> seconds. There will be about 1000 devices and increasing with about 500 per
> year. Most will be connected to the Internet by ADSL, LAN and 3G.
> It seems that MQTT is a good fit for this, but I have some concerns;
> I must be able to send messages to individually adressed devices to change
> settings etc. I guess this can be acomplished by sending a message to a
> topic that the desired device is listening to. In the message a reply
> address is provided which the device post the reply to. I guess this will
> work for fine for most situations, but what if I want to send large amount
> of data? e.g. a software update (approx. 30 MB)? will this work?
>
>
>
> Thanks!
> Niclas
>
>
> --
> Mailing list: https://launchpad.net/~mosquitto-users
> Post to : mosquitto-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~mosquitto-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
Mailing list: https://launchpad.net/~mosquitto-users
Post to : mosquitto-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mosquitto-users
More help   : https://help.launchpad.net/ListHelp