Skip to main content

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

Hi Izak,

> Q1: Is this settings per connection/device/entity - so each connection will
> have a 100 inflight message allowed, or is this a GLOBAL flag?

It is per client.

> Q2: What happens if the 100 is reach? Do we see message dropped?

No, there is relationship with max_queued_messages as well. Max
inflight messages means the most messages that the server will send
that are unacknowledged. This means it only applies to QoS 1 and 2. If
you set max_queued messages to 1, then a client should receive 10
messages, then each message flow (PUBLISH, PUBACK, or QoS 2 flow) will
complete serially 10 times, one after the other. If instead you had
set max inflight to 10, then you would see 10 lots of PUBLISH, then
the PUBACKs would come in as the client sent them.

max_queued_messages is the number of messages that can be queued up,
waiting on being sent. Anything over max_queued_messages will be
dropped.

> Q4: Is the in-flight messages queued in memory or written to disk?

They are primarily stored in memory, but depending on your persistence
settings and the type of client involved (i.e. it must be clean
session=false), they will be written to disk periodically as well.

Cheers,

Roger


Back to the top