Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] PUBREL

Hi guys,
I'm experiencing the same issue. My client connects with clean_session=1. After a reconnection, it resumes the flow, sending a PUBREL. But at this point the broker (version 1.4.10) has cleaned the previous state and the mid cannot be found in its database. So it respond with a PUBCOMP, despite the fact that this message has never completed the flow. This is causing messages with QoS=2 beeing lost.

mosquitto_new documentation is saying:

 * clean_session - set to true to instruct the broker to clean all messages
 *                  and subscriptions on disconnect, false to instruct it to
 *                  keep them. See the man page mqtt(7) for more details.
 *                  Note that a client will never discard its own outgoing
 *                  messages on disconnect. Calling <mosquitto_connect> or
 *                  <mosquitto_reconnect> will cause the messages to be resent.
 *                  Use <mosquitto_reinitialise> to reset a client to its
 *                  original state.

I'm understandig that after a reconnection, inflight messages should be republished. Why I'm seeing a PUBREL immediatly after the reconnection?

Thanks

Il giorno dom 14 mag 2017 alle ore 04:40 Aaron Chappelle <achappelle@xxxxxxxxx> ha scritto:
Hi Roger,

Thanks for the reply.  Looks like I'm using version 1.4.10.

I haven't had a chance to debug with verbose logging yet.

Can you think of anything "wrong with the client" that could do what I described?

Thanks,

Aaron




On Sat, May 13, 2017 at 2:12 PM, Roger Light <roger@xxxxxxxxxx> wrote:
Hi Aaron,

>From what you've said it seems like your client is keeping a record of
inflight messages and trying to redo them. Mosquitto 1.4.9 and up
copes with this by giving the warning that you've seen and then
sending a PUBCOMP to satisfy the client.

If that's not working out, then maybe there's something up with the client.

Cheers,

Roger


On 13 May 2017 at 20:47, Aaron Chappelle <achappelle@xxxxxxxxx> wrote:
> I'm getting a lot of broker PUBREL warnings that won't quit.
>
> Warning: Received PUBREL from [client-name] for an unknown packet identifier
> 6668.
>
> It seems to be happening when my embedded system is coming up... e.g. broker
> is launching and clients are coming up.... messages start flowing but I very
> quickly get this warning.
>
> I have clients using clean sessions, and messages being sent at QOS level 2.
> Persistence is in memory on client and broker.
>
> I'm just starting to look into this and will turn logging up to understand
> it better, but wanted to ask if anyone could think of some reasons this
> would occur.
>
> I was thinking one scenario could be said client disconnected before a
> PUBREL was sent... when it reconnected with a clean session it tried to send
> its PUBREL but now the broker didn't have record of said packet id.  I still
> need to verify there was a disconnect though, and then why.
>
> Any thoughts?
>
>
>
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/mosquitto-dev
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mosquitto-dev

_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mosquitto-dev
--
Alessandro Pezzato

Back to the top