mosquitto-users team mailing list archive
-
mosquitto-users team
-
Mailing list archive
-
Message #00401
Re: 回复: Connection lost question
This doesn't seem to be related to Francois' problem, so I presume you
meant to reply in the "I met a strange question" thread.
I'm afraid it's still very difficult to know exactly what problem you
are having. Please post exactly the steps you go through and exactly
what you expect to happen. Don't miss any steps out and don't omit any
configuration options - you say you have those three options in use,
but then connect to a non-standard port. Either you missed a
configuration option or you are connecting to a different broker than
you think.
If you are saying that you expect the mosquitto_sub client to receive
the test11 message, but that you have deleted the persistence file
before restarting mosquitto, then this is expected behaviour. If you
delete the persistence file then you have deleted the information that
mosquitto would use to know which clients should have messages stored.
In effect, this is the first time that the client "112" has connected
to the broker.
Regards,
Roger
On Thu, Dec 12, 2013 at 11:51 AM, 灰(Grey)狼 <86267306@xxxxxx> wrote:
> I config below options in default mosquitto.conf, use
> mosquitto_pub、mosquitto_sub command also met same problem.
>
> persistence true
> persistence_file mosquitto.db
> persistence_location e:\mosquitto\ (this location can not with
> space such as 'programe files'. is it a bug?)
>
> mosquitto_pub -t dsc/110/test -u admin -P admin -h 192.168.100.79 -p
> 55003 -m test11 -q 2
> mosquitto_sub -t dsc/# -u admin -P admin -h 192.168.100.79 -p 55003 -q 2
> -c -i 112
>
>
> ------------------ 原始邮件 ------------------
> 发件人: "roger";<roger@xxxxxxxxxx>;
> 发送时间: 2013年12月12日(星期四) 晚上6:32
> 收件人: "Francois van der Merwe"<francoisvdm@xxxxxxxxxxxxxxxxx>;
> 抄送:
> "mosquitto-users@xxxxxxxxxxxxxxxxxxx"<mosquitto-users@xxxxxxxxxxxxxxxxxxx>;
> 主题: Re: [Mosquitto-users] Connection lost question
>
> Hi Francois,
>
> I'm afraid that after sending you here from twitter, this is actually
> related to the paho client libraries. When a client connects to
> mosquitto (or other mqtt broker) with a duplicate client id, the
> oldest client of the two is disconnected. There is no communication
> with the old client about that, it is just the socket being closed.
> This means that it is up to the client how to inform you, although it
> is essentially impossible for the client to know that it has been
> disconnected for this reason.
>
> Cheers,
>
> Roger
>
>
> On Thu, Dec 12, 2013 at 9:50 AM, Francois van der Merwe
> <francoisvdm@xxxxxxxxxxxxxxxxx> wrote:
>> Hi All
>>
>>
>>
>> Windows c client, paho libs. Mosquitto server on raspberry Pi or on
>> Windows
>> 7.
>>
>>
>>
>> When another MQTT client connects to the broker with the same client ID it
>> logs off the first client and it calls back to “connlost” with 2
>> parameters,
>> “context” and “cause”.
>>
>>
>>
>> I would expect to find some values in those two fields, but I only see 0x0
>> in both fields.
>>
>>
>>
>> Any comments?
>>
>>
>>
>> Thank you
>>
>>
>>
>>
>>
>> Francois van der Merwe
>>
>> Integration Specialist
>>
>> 082 556 9467
>>
>>
>>
>> Follow me on twitter: francoisvdmerwe
>>
>>
>>
>>
>> --
>> Mailing list: https://launchpad.net/~mosquitto-users
>> Post to : mosquitto-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~mosquitto-users
>> More help : https://help.launchpad.net/ListHelp
>>
>
> --
> Mailing list: https://launchpad.net/~mosquitto-users
> Post to : mosquitto-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~mosquitto-users
> More help : https://help.launchpad.net/ListHelp
>
> --
> Mailing list: https://launchpad.net/~mosquitto-users
> Post to : mosquitto-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~mosquitto-users
> More help : https://help.launchpad.net/ListHelp
>
References